FixedOffsetTimeZoneToLocation creates a time.Location with a set offset and with a name that can be marshaled by crdb between nodes.
(offset int, origRepr string)
| 247 | // FixedOffsetTimeZoneToLocation creates a time.Location with a set offset and |
| 248 | // with a name that can be marshaled by crdb between nodes. |
| 249 | func FixedOffsetTimeZoneToLocation(offset int, origRepr string) *time.Location { |
| 250 | return time.FixedZone( |
| 251 | fmt.Sprintf("%s%d (%s)", fixedOffsetPrefix, offset, origRepr), |
| 252 | offset) |
| 253 | } |
| 254 | |
| 255 | // currentDateAsPrefix will allow the timetz value to have the current time zone |
| 256 | // rather than timezone of 1970-01-01 in cases of timezone undefined. |