QNX® RTOS 4.25 Technical Note:

Changes to Daylight Saving Time in North America

Date of this edition: January 29, 2007

Contents

What's changing?

The USA is changing its time zone rules, effective March 1, 2007, as part of the Energy Policy Act of 2005. The change affects when daylight saving time starts and ends:

Daylight Saving Time: Old: New:
Starts The first Sunday in April The second Sunday in March
Ends The last Sunday in October The first Sunday in November

While the standard rule will change across all states, US states will still have the right not to observe daylight saving time, as per the Uniform Time Act of 1966. For information about American time zones, see http://www.time.gov.

Canada is changing its time zones in a similar way; for more information, see http://inms-ienm.nrc-cnrc.gc.ca/time_services/daylight_saving_e.html and http://inms-ienm.nrc-cnrc.gc.ca/faq_time_e.html.

Mexico's rules for daylight saving time remain unchanged. For more information, see http://www.cenam.mx/horaexacta.asp.

Specifying the time zone in QNX 4

In QNX 4, the TZ environment variable specifies the time zone. This variable might be set in the following files:

You need to edit these files and update the setting for TZ.


Note: If TZ isn't set, it's assumed to be EST5EDT, which the libraries interpret according to the old rule.

Make sure that wherever you specify the time zone, you use the full specification, which is in the form (with spaces added for clarity):

std offset dst offset, rule

The complete format is as follows:

stdoffset[dst[offset][,start[/time],end[/time]]]

Its components are:

std and dst
Three or more letters that you specify to designate the standard or daylight saving time zone. Only std is required. If you omit dst, then daylight saving time doesn't apply in this location. Upper- and lowercase letters are allowed. The name can't start with a colon (:) and can't include digits, commas (,), minus signs (-), plus signs (+), or ASCII NUL (\0) characters.
offset
The value you must add to the local time to arrive at Coordinated Universal Time (UTC). The offset following std is required. If no offset follows dst, summer time is assumed to be one hour ahead of standard time. The offset has the form:

hh[:mm[:ss]]

The hour (0 <= hh <= 24) is required, but the minutes (0 <= mm <= 59) and seconds (0 <= ss <= 59) are optional. If the hour is preceded by a minus sign (-), the time zone is east of the prime meridian; otherwise it's west (which may be indicated by an optional preceding "+").

rule
Indicates when to change to and from summer time. The rule has the form:

date/time,date/time

where the first date describes when the change from standard to summer time occurs, and the second date describes when the change back happens. Each time field describes when, in current local time, the change to the other time is made.

The format of date may be one of the following:

Jn
The Julian day n (1 <= n <= 365). Leap days aren't counted. That is, in all years--including leap years--February 28 is day 59, and March 1 is day 60. It's impossible to refer to February 29.
n
The zero-based Julian day (0 <= n <= 365). Leap days are counted, so you can refer to February 29.
Mm.n.d
The dth day (0 <= d <= 6) of week n of month m of the year (1 <= n <= 5, 1 <= m <= 12, where week 5 means "the last d day in month m", which may occur in the fourth or fifth week). Week 1 is the first week in which the dth day occurs. Day zero is Sunday.

The time has the same format as offset, except that no leading sign ("+" or "-") is allowed. The default, if time is omitted, is 02:00:00.

For example, the rule for Newfoundland time, NST03:30NDT02:30,M3.2.0/00:01,M11.1.0/00:01, indicates the following:

New definitions of time zones

Here are the new definitions of the US and Canadian time zones. A blank in the "As observed in" column indicates the general case.

Time zone: As observed in: Definition:
Newfoundland   NST03:30NDT02:30,M3.2.0/00:01,M11.1.0/00:01
Atlantic   AST04ADT03,M3.2.0/2,M11.1.0/2
  New Brunswick and Labrador AST04ADT03,M3.2.0/00:01,M11.1.0/00:01
Eastern   EST05EDT04,M3.2.0/2,M11.1.0/2
Central   CST06CDT05,M3.2.0/2,M11.1.0/2
  Manitoba CST06CDT05,M3.2.0/2,M11.1.0/3
  Saskatchewan CST06
Mountain   MST07MDT06,M3.2.0/2,M11.1.0/2
  Arizona (non-Navajo region) MST07
Pacific   PST08PDT07,M3.2.0/2,M11.1.0/2
Alaska   AKST09AKDT08,M3.2.0/2,M11.1.0/2
Hawaii-Aleutian Hawaii HST10
  Aleutian islands HST10HDT09,M3.2.0/2,M11.1.0/2

Caveats


© 2007, QNX Software Systems GmbH & Co. KG. All rights reserved.

Published under license by:

QNX Software Systems International Corporation
175 Terence Matthews Crescent
Kanata, Ontario
K2M 1W8
Canada
Voice: +1 613 591-0931
Fax: +1 613 591-3579
Email:
Web: http://www.qnx.com/

QNX, Neutrino, Photon, Photon microGUI, Momentics, and "Build a More Reliable World" are trademarks, registered in certain jurisdictions, of QNX Software Systems GmbH & Co. KG and are used under license by QNX Software Systems International Corporation. All other trademarks belong to their respective owners.