Solved

Timezone changed on Solaris 5.9

Posted on 2008-11-02
5
1,282 Views
Last Modified: 2013-12-21
Hi,
Trying to figure out why the timezone's on some of our solaris 5.9 servers have changed.

We had our servers set to CEST timezone. However, they have now changed to CET (which is causing problems with all our CRON jobs). Trying to figure out how this change occurred. I check the modification time of the /etc/default/init file but it has not been modified since the server was first installed.

The /etc/default/init file is set to TZ=Europe/Stockholm which shows as CET when i run the following command:
zdump Europe/Stockholm
0
Comment
Question by:inoc
[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
5 Comments
 
LVL 38

Expert Comment

by:yuzh
ID: 22863947
To check change your timezone for thw whole system you need to do the followings:

For a list of the TIMEZONE you can use have a look at:
ls /usr/share/lib/zoneinfo
1. edit /etc/TIMEZONE file, change the TZ variable (I've done this)
  you might need to change the LC_TIME var if required

2.reboot

3. use "date" command to change the time to the local time.

man date
to learn more details.
have a look at the answer in http:Q_21325413.html and http:Q_20581191.html
a user can also set their login session to use different timezone by defined TZ in their login script (eg, .profile for sh/ksh/bash, .cshrc for csh/tcsh etc)
also you need to check your script (run by cron) and application startup script, you see if any where hard code the timezone variable (TZ).
0
 

Author Comment

by:inoc
ID: 22864269
Thanks for the reply,
I am okay setting the timezone back to what it should it be. But what I want to know is how to find out how/why it was changed in the first place (to prevent this happening again in the future).

I have checked the modification time on /etc/TIMEZONE (/etc/default/init) and this file has not changed, even though the timezone has changed.
0
 
LVL 38

Accepted Solution

by:
yuzh earned 500 total points
ID: 22864704
>>But what I want to know is how to find out how/why it was changed in the first place (to prevent this happening again in the future).
ask the sys adm team member to find out who changed it.
If none in your team changed it .
see the second part of my comment, check when /etc/TIMEZONE file was modify, the your cron jobs (the code in your corn jobs scripts, the application startup scripts, /etc/profile,  and user's login scripts (.profile, .cshrc file under users's home).

0
 
LVL 22

Expert Comment

by:blu
ID: 22866899
I am a little confused. What exactly is in the /etc/TIMEZONE file?  The Europe/Stockholm timezone conforms to EU daylight savings time rules, so in fact the systems in question should always have been part of the CET timezone, and since the EU rules
mandate the change to standard time on the last Sunday in October, the shift from CEST to CET should have occurred
automatically 8 days ago, which is seems did indeed happen as it was supposed to.

So, it appears that the problem is not with the timezone, but with cron.  The standard Solaris bundled cron is supposed to handle the change, but there might be a bug. Also, how it handles it may not be intuitive. An easy solution is to just restart cron.
0
 
LVL 14

Expert Comment

by:arthurjb
ID: 22873203
>>I am okay setting the timezone back to what it should it be. But what I want to know is how to find out how/why it was changed in the first place (to prevent this happening again in the future).


There were some timezone patches earlier in the year, and it may have been a patch that changed it.

Take a look in /usr/share/lib/zoneinfo and check the file modification times, that may give you the answer.
0

Featured Post

Industry Leaders: 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!

Question has a verified solution.

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

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
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 find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

729 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