?
Solved

Disable bi-yearly time changes in Solaris 10

Posted on 2012-03-20
7
Medium Priority
?
697 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 2000 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

Application Discovery Service in AWS

In the era of the cloud, customers migrating away from their existing on-premise infrastructure. This requires lots of planning, strategies, and effort to identify their existing resources and determine how best to migrate.  Datacenter migrations happen in four phases -

Question has a verified solution.

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

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. …
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

719 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