%TIMEZONE

Return the time zone of the current machine

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
offset = %TIMEZONE([timezone][, daylight])

Return value

offset

The number of minutes east of the Greenwich Meridian. (n)

Arguments

timezone

(optional) Returned with the name of the current time zone as defined on the local system. (a)

For example,

daylight

(optional) Returned with one of the following daylight savings time flags: (n)

0 = Daylight saving time is not in effect.

nonzero = Daylight saving time is in effect.

Discussion

%TIMEZONE returns the number of minutes east of the Greenwich Meridian in which the current machine is located and optionally returns the name of the current time zone and/or whether daylight saving time is in effect. For example, if the current time is 5 hours west of Greenwich, the offset value would be ‑300. If the current time is 3 hours east of Greenwich, offset would be 180.

You can use %TIMEZONE as an argument to %DATETIME.

See also

%DATETIME.

Examples

In the example below, %TIMEZONE will return the number of minutes east of Greenwich for the current time zone and will fill zonename with the name of the current time zone as defined on the current system.

offset = %timezone(zonename)