QNX® Neutrino® RTOS Technical Note:

Changes to Daylight Saving Time in North America

Date of this edition: March 01, 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 Neutrino

Neutrino uses either the TZ environment variable or the _CS_TIMEZONE configuration string to determine the time zone. If TZ isn't set, the system uses the value of _CS_TIMEZONE instead. The POSIX standards include the TZ environment variable; _CS_TIMEZONE is a Neutrino implementation. The description below applies to both.


Note: How you update your system depends on what you've installed. If you're running Photon, and your system includes phlocale, you might be able to download a patch from the Download Center on our website:
If you have: You should:
QNX Neutrino 6.2 or later; QNX Neutrino x86 Runtime Kit Install the Changes to Daylight Saving Time Patch (Patch ID 518)
QNX Neutrino 6.0.x or 6.1.x Edit the /etc/timezone/uc_tz_t file and update the affected entries
Earlier than 6.0 Manually update the TZ environment variable or _CS_TIMEZONE configuration string

These patches replace the uc_tz_t file that phlocale uses to define the time zones. Once you've installed the patch, you simply have to use phlocale (Localization or Time & Date on the shelf) to change your time zone; select the appropriate zone, and phlocale does everything else.


If you aren't running Photon, you need to set TZ or _CS_TIMEZONE. To set the time zone when you boot your machine, you have to put the same information in the /etc/TIMEZONE file.


Note: If you don't set either TZ or _CS_TIMEZONE, Neutrino assumes the time zone is EST5EDT, which the libraries interpret according to the old rule.

If you manually specify the time zone, 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
Eastern   EST05EDT04,M3.2.0/2,M11.1.0/2
Central   CST06CDT05,M3.2.0/2,M11.1.0/2
  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.