MakeTimeTZFromTime creates a TimeTZ from a time.Time. It will be trimmed to microsecond precision.
(t time.Time)
| 69 | // MakeTimeTZFromTime creates a TimeTZ from a time.Time. |
| 70 | // It will be trimmed to microsecond precision. |
| 71 | func MakeTimeTZFromTime(t time.Time) TimeTZ { |
| 72 | return MakeTimeTZFromLocation( |
| 73 | timeofday.New(t.Hour(), t.Minute(), t.Second(), t.Nanosecond()/1000), |
| 74 | t.Location(), |
| 75 | ) |
| 76 | } |
| 77 | |
| 78 | // Now returns the TimeTZ of the current location. |
| 79 | func Now() TimeTZ { |
no test coverage detected
searching dependent graphs…