@Zone (Formula Language)
Returns the time zone setting of the current computer or of a time-date value, and indicates if daylight-saving time is observed.
The time zone is represented as the number of hours that must be added to the time-date to convert it to Greenwich Mean Time.
Syntax
@Zone @Zone( timeDate )
Parameters
timeDate
Time-date or time-date list. Optional. The time-date whose zone you want to know. You must specify both a date and a time; otherwise, @Zone returns 0.
Return value
zoneNumber . dstFlag
Number or number list. The time zone, followed by a period, followed by a flag indicating daylight-saving time.
- For time zones east of GMT, zoneNumber is negative.
- For time zones west of GMT, zoneNumber is positive.
- When you use @Zone with no parameter, and daylight-saving time is being observed on the current computer, dstFlag is 1. If daylight-saving time is not being observed, only the zoneNumber is returned.
- When you use @Zone with a parameter, and the specified date falls within the daylight-saving time boundary, dstFlag is 1. If the date does not fall within daylight-saving time, only the zoneNumber is returned.
Usage
When used without a parameter, @Zone returns the zone and daylight-saving time setting of the current computer.
When used with the parameter currentTimeDate, @Zone returns the zone and daylight-saving time setting of currentTimeDate.
If the parameter is a list, the function operates on each element of the list, and the return value is a list with the same number of elements.
Time zones that are not full-hour increments from GMT
For time zones that are not a full hour increment from GMT, the return value is:
mmhh . dstFlag
mm is the minutes component of the time relative to GMT.
hh is the hours component of the time relative to GMT
dstFlag is .1 if daylight-saving time is being observed. Otherwise, only the mmhh is returned.
For example, on a computer with a time zone setting eleven and a half hours west of GMT, with daylight-saving time disabled, @Zone returns: 3011
On a computer with a time zone setting ten and three-quarter hours west of GMT, with daylight-saving time enabled, @Zone returns: 4510.1
On a computer with a time zone setting nine and a half hours east of GMT, with daylight-saving time enabled, @Zone returns: -3009.1
Examples
- This example returns:
- 5.1 for Eastern Standard Time and daylight-saving time observed.
- 5 for Eastern Standard Time and daylight-saving time not observed.
- 6 for Central Standard Time and daylight-saving time not observed.
- 7.1 for Mountain Standard Time and daylight-saving time observed.
- 8.1 for Pacific Standard Time and daylight-saving time observed.
@Zone
- This example returns 5 if in the Eastern Standard time zone.
@Zone([1/26/94 11:00 AM])
- This example returns 5.1 if in the Eastern Standard time zone
and daylight-saving time is observed, 5 if daylight-saving time is
not observed.
@Zone([5/28/94 11:00 AM])
- This example returns 5 and 5.1 in a list if in the Eastern Standard
time zone.
@Zone([1/26/94 11:00 AM] : [5/28/94 11:00 AM])