Time constructs a time instant constant from nanoseconds since Unix epoch (1970-01-01 00:00:00 UTC). The valid range is approximately 1678 to 2262 CE.
(nanos int64)
| 322 | // Time constructs a time instant constant from nanoseconds since Unix epoch (1970-01-01 00:00:00 UTC). |
| 323 | // The valid range is approximately 1678 to 2262 CE. |
| 324 | func Time(nanos int64) Constant { |
| 325 | return Constant{TimeType, "", nanos, nil, nil} |
| 326 | } |
| 327 | |
| 328 | // Duration constructs a duration constant from nanoseconds. |
| 329 | // Positive values represent forward durations, negative values represent backward durations. |
no outgoing calls