Solved

Timezone changed on Solaris 5.9

Posted on 2008-11-02
5
1,256 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
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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…

707 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

18 Experts available now in Live!

Get 1:1 Help Now