(ts, tz ref.Val)
| 1040 | } |
| 1041 | |
| 1042 | func timestampGetMilliseconds(ts, tz ref.Val) ref.Val { |
| 1043 | t, err := inTimeZone(ts, tz) |
| 1044 | if err != nil { |
| 1045 | return types.NewErrFromString(err.Error()) |
| 1046 | } |
| 1047 | return types.Int(t.Nanosecond() / 1000000) |
| 1048 | } |
| 1049 | |
| 1050 | func inTimeZone(ts, tz ref.Val) (time.Time, error) { |
| 1051 | t := ts.(types.Timestamp) |
no test coverage detected