Solved

Disable bi-yearly time changes in Solaris 10

Posted on 2012-03-20
7
682 Views
Last Modified: 2012-05-18
Hi,

Within Solaris 10 Zones, is there any way of disable time Daylight saving time changes (as this throws off our application in all sorts of ways)? Also, we cannot afford a zone reboot, as we have left it too late to schedule a Maintenance Window (GMT time changes to BST this weekend).

Any help would be greatly appreciated.

Thanks in advance,

Andy
0
Comment
Question by:acrxx
  • 4
  • 3
7 Comments
 
LVL 16

Expert Comment

by:Joseph Gan
ID: 37745043
Can you please show "echo $TZ", "cat /etc/TIMEZONE" and "ls -al /usr/share/lib/zoneinfo", thanks.
0
 

Author Comment

by:acrxx
ID: 37745211
Hi ganjos,

Here they are:

echo $TZ
GB

cat /etc/TIMEZONE                                                                                                                                      
TZ=UTC
CMASK=022

ls -al /usr/share/lib/zoneinfo                                                                                                                          
total 196
drwxr-xr-x  21 root     bin           66 May 20  2009 .
drwxr-xr-x  16 root     sys           18 May 20  2009 ..
drwxr-xr-x   2 root     bin           55 May 20  2009 Africa
drwxr-xr-x   6 root     bin          135 May 20  2009 America
drwxr-xr-x   2 root     bin           12 May 20  2009 Antarctica
drwxr-xr-x   2 root     bin            3 May 20  2009 Arctic
drwxr-xr-x   2 root     bin           91 May 20  2009 Asia
drwxr-xr-x   2 root     bin           14 May 20  2009 Atlantic
drwxr-xr-x   2 root     bin           25 May 20  2009 Australia
drwxr-xr-x   2 root     bin            6 May 20  2009 Brazil
-rw-r--r--   1 root     bin          765 Nov 21  2008 CET
-rw-r--r--   1 root     bin          837 Nov 21  2008 CST6CDT
drwxr-xr-x   2 root     bin           11 May 20  2009 Canada
drwxr-xr-x   2 root     bin            4 May 20  2009 Chile
-rw-r--r--   2 root     bin          871 Nov 21  2008 Cuba
-rw-r--r--   1 root     bin          679 Jan 22  2005 EET
-rw-r--r--   1 root     bin           56 Nov 21  2008 EST
-rw-r--r--   1 root     bin          837 Nov 21  2008 EST5EDT
-rw-r--r--   2 root     bin          955 Nov 21  2008 Egypt
-rw-r--r--   2 root     bin         1285 Jan 22  2005 Eire
drwxr-xr-x   2 root     bin           37 May 20  2009 Etc
drwxr-xr-x   2 root     bin           60 May 20  2009 Europe
-rw-r--r--   1 root     bin          101 Jan 22  2005 Factory
-rw-r--r--   7 root     bin         1323 Nov 21  2008 GB
-rw-r--r--   7 root     bin         1323 Nov 21  2008 GB-Eire
-rw-r--r--  10 root     bin           56 Jan 22  2005 GMT
-rw-r--r--  10 root     bin           56 Jan 22  2005 GMT+0
-rw-r--r--  10 root     bin           56 Jan 22  2005 GMT-0
-rw-r--r--  10 root     bin           56 Jan 22  2005 GMT0
-rw-r--r--  10 root     bin           56 Jan 22  2005 Greenwich
-rw-r--r--   1 root     bin           56 Nov 21  2008 HST
-rw-r--r--   2 root     bin          426 Jan 22  2005 Hongkong
-rw-r--r--   2 root     bin          429 Jan 22  2005 Iceland
drwxr-xr-x   2 root     bin           13 May 20  2009 Indian
-rw-r--r--   2 root     bin          610 Nov 21  2008 Iran
-rw-r--r--   3 root     bin          803 Nov 21  2008 Israel
-rw-r--r--   2 root     bin          185 Jan 22  2005 Jamaica
-rw-r--r--   2 root     bin          125 Nov 21  2008 Japan
-rw-r--r--   2 root     bin           87 Jan 22  2005 Kwajalein
-rw-r--r--   2 root     bin          238 Jan 22  2005 Libya
-rw-r--r--   1 root     bin          765 Nov 21  2008 MET
-rw-r--r--   1 root     bin           56 Nov 21  2008 MST
-rw-r--r--   1 root     bin          837 Nov 21  2008 MST7MDT
drwxr-xr-x   2 root     bin            5 May 20  2009 Mexico
drwxr-xr-x   2 root     bin            5 May 20  2009 Mideast
-rw-r--r--   2 root     bin          882 Nov 21  2008 NZ
-rw-r--r--   2 root     bin          732 Nov 21  2008 NZ-CHAT
-rw-r--r--   4 root     bin          877 Nov 21  2008 Navajo
-rw-r--r--   2 root     bin          165 Jan 22  2005 PRC
-rw-r--r--   1 root     bin          837 Nov 21  2008 PST8PDT
drwxr-xr-x   2 root     bin           42 May 20  2009 Pacific
-rw-r--r--   2 root     bin          981 Nov 21  2008 Poland
-rw-r--r--   2 root     bin         1264 Jan 22  2005 Portugal
-rw-r--r--   2 root     bin          152 Jan 22  2005 ROK
-rw-r--r--   2 root     bin          171 Jan 22  2005 Singapore
-rw-r--r--   3 root     bin          993 Nov 21  2008 Turkey
-rw-r--r--   2 root     bin           56 Jan 22  2005 UCT
drwxr-xr-x   2 root     bin           15 May 20  2009 US
-rw-r--r--   6 root     bin           56 Jan 22  2005 UTC
-rw-r--r--   6 root     bin           56 Jan 22  2005 Universal
-rw-r--r--   2 root     bin          815 Jan 22  2005 W-SU
-rw-r--r--   1 root     bin          679 Jan 22  2005 WET
-rw-r--r--   6 root     bin           56 Jan 22  2005 Zulu
lrwxrwxrwx   1 root     root          12 Jul 22  2009 posixrules -> ./US/Eastern
drwxr-xr-x   2 root     bin           18 May 20  2009 src
drwxr-xr-x   2 root     bin            5 May 20  2009 tab
0
 
LVL 16

Expert Comment

by:Joseph Gan
ID: 37745266
If "TZ" is present, it takes the precedence. Also you can change it in /etc/TIMEZONE to be "TZ=GB" just in case. The fast way is to rename Europe dir under /usr/share/lib/zoneinfo to something else, so system won't be able to find it. Since you are not change time zone, reboot is not required.
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Author Comment

by:acrxx
ID: 37745804
Hi ganjos,

Thanks. The time zone we want is actually UTC, and it looks like this isn't being picked up from /etc/TIMEZONE. How would I go about globally setting the TZ variable without a reboot? The solution doesn't have to be elegant as we have a reboot scheduled for next week which will correctly ensure that TZ is locked to UTC.

Thanks in advance,

Andy
0
 

Author Comment

by:acrxx
ID: 37746133
Hi ganjos,

I just reread your comment, is the suggestion of "The fast way is to rename Europe dir" meant as the immediate solution which would prevent a time change? Would you mind elaborating a little on why this would have the desired effect?

Thanks in advance,

Andy
0
 
LVL 16

Accepted Solution

by:
Joseph Gan earned 500 total points
ID: 37749372
If "TZ" is present, it takes the precedence. Now your TZ=GB, to reset to UTC, use "TZ=UTC; export $TZ", then check it with "echo $TZ" commands.

The files/dirs under /usr/share/lib/zoneinfo were all the compiler timezones on this server, rename the names would make a time changing un-success, therefor is one of the temp
sulotions for it.
0
 

Author Closing Comment

by:acrxx
ID: 37986413
I guess, there is no elegant solution on Solaris (without a restart). Thanks for helping.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now