Open bryaan opened 2 years ago
You can use access the offset of a specific ZonedDateTime
via:
julia> using TimeZones
julia> now(tz"America/New_York").zone.offset
UTC-5/+1
julia> string(ans)
"-04:00"
If this is something you're just wanting to view for yourself you can do:
julia> show_next_transition(tz"America/New_York")
Transition Date: 2021-11-07
Local Time Change: 02:00 → 01:00 (Backward)
Offset Change: UTC-5/+1 → UTC-5/+0
Transition From: 2021-11-07T01:59:59.999-04:00 (EDT)
Transition To: 2021-11-07T01:00:00.000-05:00 (EST)
Which shows the current offset in "Offset Change" as well as a other information.
@omus Thank you! Can we add an int(timezoneawaretime) to make integer conversion easier?
How can I get the current UTC offset from
tz"America/New_York"
?