daylightsavingstimeoffset(
TIMEZONE
,
DATE
)

The daylightsavingstimeoffset( function returns the current daylight saving time offset of the specified time zone.


Parameters

This function has two parameters:

timezone – geographic area to check. This parameter is optional – if omitted, the local time zone will be used.

date – allows you to specify a date into the future. This parameter is optional – if omitted, today’s date will be used.


Description

This function returns the current daylight savings time offset of the specified time zone (in seconds). This is usually 3600 seconds (1 hour) if Daylight Savings Time is currently in effect, or zero during standard time. However, in a few time zones values more or less than an hour may be used.

One use for this function is to convert a time into standard time, even if daylight savings time is currently in effect. This formula calculates the current time in standard time, even during the summer when Daylight Time is officially in effect.

now()-daylightsavingstimeoffset()

This technique can also be used when converting local time into another time zone. For example, this formula will convert the current local time into Eastern Standard Time, whether or not daylight savings time is in effect.

converttimezone(now(),"New York")-daylightsavingstimeoffset("New York")

If the time being converted is associated with any day other than today, you must include the date when calculating the offset. After all, between now and next tuesday daylight savings time might switch on or off – including the date allows the offset to take any such transition to be taken into account.

converttimezone(superdate(date("next tuesday",now()),"New York")
    -daylightsavingstimeoffset("New York",date("next tuesday"))

See Also


History

VersionStatusNotes
10.2NewNew in this version