Timex.Timezone
Contains all the logic around conversion, manipulation, and comparison of time zones.
Summary↑
convert(date, tz) | Convert a date to the given timezone |
diff(date, destination) | Determine what offset is required to convert a date into a target timezone |
get(tz) | Get the TimezoneInfo object corresponding to the given name |
local() | Get’s the current local timezone configuration. You can provide a reference date to get the local timezone for a specific date, but the operation will not be cached lik getting the local timezone for the current date |
local(date) |
Functions
Specs:
- convert(date :: Timex.DateTime.t, tz :: Timex.TimezoneInfo.t) :: Timex.DateTime.t
Convert a date to the given timezone.
Specs:
- diff(date :: Timex.DateTime.t, tz :: Timex.TimezoneInfo.t) :: integer
Determine what offset is required to convert a date into a target timezone
Get the TimezoneInfo object corresponding to the given name.
Get’s the current local timezone configuration. You can provide a reference date to get the local timezone for a specific date, but the operation will not be cached lik getting the local timezone for the current date