QNX Technical Articles
QNX® Momentics® Development Suite 6.2 or later; QNX® Neutrino® x86 Runtime Kit Changes to Daylight Saving Time Patch (Patch ID 518) Release Notes
Date of this edition: March 01, 2007
Target OS: QNX® Neutrino® 6.2 or later; QNX® Neutrino® x86 Runtime Kit
Host OS: Microsoft Windows XP, 2000, or NT SP6A; Sun Solaris 7, 8, 9, or 10; QNX® Neutrino® 6.2 or later; QNX® Neutrino® x86 Runtime Kit; Linux Red Hat 8 or 9, Red Hat Enterprise WS 3 or 4, Red Hat Fedora Core 3 or 4, Debian 3.1, or SUSE 10
![]() |
This patch supersedes the Changes to Daylight Saving Time Patch (Patch ID 494), which contained out-of-date information about the time zones in Manitoba and New Brunswick. |
| If you have: | You should: |
|---|---|
| QNX Neutrino 6.2 or later; QNX Neutrino x86 Runtime Kit | Install this patch |
| QNX Neutrino 6.0.x or 6.1.x | Manually update the /etc/timezone/uc_tz_t file |
| Earlier than 6.0 | Manually update the TZ environment variable or _CS_TIMEZONE configuration string |
This note includes:
- What's in this patch?
- Fixed issues
- Specifying the time zone in QNX Neutrino
- New definitions of time zones
- Known issues
- Technical support
What's in this patch?
This patch replaces uc_tz_t, the file that defines the time zones that phlocale lets you choose from.
Fixed issues
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.
The new version of /etc/timzone/uc_tz_t also includes the following updates and corrections:
- As of April 2006, all counties in Indiana observe daylight saving time, so we've removed the special entry for Indiana East. (Ref# 40378)
- We've corrected the entry for Saskatchewan. Most of the province is in the Central, not Mountain, time zone and doesn't observe daylight saving time. (Ref# 44401)
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.
If you're running Photon, the easiest way to change your time zone is via phlocale (Localization or Time & Date on the shelf). Select the appropriate zone, and phlocale does everything else.
![]() |
The phlocale application loads the uc_tz_t file only when the application starts. If you were running phlocale when you installed the patch, exit phlocale and restart it before selecting the time zone. |
If you're not 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.
![]() |
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:
- Newfoundland Standard Time is 3.5 hours earlier than UTC.
- Standard time and daylight saving time both apply.
- Newfoundland Daylight Time is 2.5 hours earlier than UTC.
- Daylight saving time starts at 12:01 a.m. standard time on the second Sunday in March, and it ends at 12:01 a.m. daylight saving time on the first Sunday in November.
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
- Time zones depend on local legislation and may differ from those given above.
- The calculation of local time in Neutrino isn't sophisticated enough to apply the old rules before March 1, 2007, and the new rules after that. The setting you use for TZ applies to all local times.
- The abbreviated names in the table above aren't necessarily standard and might not uniquely identify the time zone.
Known issues
QNX Neutrino uses a nonstandard method of defining time zones that's difficult to keep up to date. We plan to replace it in a later release. (Ref# 44425)
Technical support
If you have any questions, comments, or problems with a QNX product, please contact Technical Support. For more information, see the How to Get Help chapter of the Welcome to QNX Momentics guide or visit our website, www.qnx.com.
