set time zone
sets the time zone component of a datetime
(datetime subject, string timeZone) -> datetime
Returns datetime subject
with the time zone component set to timeZone
.
If resulting datetime is in a DST gap, the datetime is adjusted forward by the length of the gap. If resulting datetime is in a DST overlap, the earlier valid offset is used.
Returns nil
if any argument is nil
.
Parameters
Name | Type | Description |
---|---|---|
subject |
datetime | The datetime to work with |
timeZone |
string | The time zone to set |