Tempus.Slot.shift_tz
You're seeing just the function
shift_tz
, go back to Tempus.Slot module for more information.
Link to this function
shift_tz(slot, tz \\ "Etc/UTC", tz_db \\ Calendar.get_time_zone_database())
View SourceSpecs
shift_tz( slot :: t(), tz :: Calendar.time_zone(), tz_db :: Calendar.time_zone_database() ) :: t()
Shifts both from
and to
values to UTC
zone.
Examples
slot = %Tempus.Slot{
from: DateTime.from_naive!(~N|2018-01-05 21:00:00|, "America/New_York"),
to: DateTime.from_naive!(~N|2018-01-08 08:59:59|, "Australia/Sydney")
}
#⇒ #Slot<[from: ~U[2018-01-06 02:00:00Z], to: ~U[2018-01-07 21:59:59Z]]>