Support Support Downloads Knowledge Base Apex Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

POSIX-compliant time-zone string



Article ID: KB9892 KB Last Updated: 24 Jun 2010Version: 5.0
How to configure and interpret POSIX-compliant time-zone string, as mentioned in PSN-2006-12-027
In the below example, the following daylight saving rules are assumed for West Australian Standard Time:

The first Sunday in October at 2:00am clocks go forward 1 hour.
The first Sunday in April at 3:00am clocks go back 1 hour.

According to the above requirements, in JUNOS 7.5R1 or higher the node can be configured under the [system time-zone] hierarchy as follows:

   georg@ankara-re0# set system time-zone WST-8WDT-9,M10.1.0/2,M4.1.0/3

Explanation of the above time-zone string:
WST zone name (West Australian Standard Time)
-8 WST is 8 hours ahead of UTC (Coordinated Universal Time)
WDT daylight savings zone name (West Australian Daylight Time)
-9 WDT is 9 hours ahead of UTC
M10.1.0/2 Start of WDT - October (Month 10), the first (1) Sunday(0), 2.00am
M4.1.0/3 End of WDT and begining of WST - April (Month 4), first (1) Sunday (0), 3.00am

In older releases, the above only works if the logged in user is root, or if the CLI is being reset.

See below example:

georg@ankara-re0> show system uptime | match current
Current time: 2007-06-28 14:09:05 CEST

georg@ankara-re0> configure
Entering configuration mode

georg@ankara-re0# set system time-zone WST-8WDT-9,M10.1.0/2,M4.1.0/3

georg@ankara-re0# commit and-quit
commit complete
Exiting configuration mode

georg@ankara-re0> show system uptime | match current
Current time: 2007-06-28 14:09:19 CEST

georg@ankara-re0> start shell user root
root@ankara-re0% cli
georg@ankara-re0> show system uptime |match current
Current time: 2007-06-28 20:09:55 WST


In older releases, this only works for the current process because the POSIX modifications only works when it is set in the TZ variable. The /etc/localtime is never checked for POSIX specification format.

The problem is being tracked via PR/103724.

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search