Solved

Timezone changed on Solaris 5.9

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
prtdiag report hdd failure 10 149
Access Required to Read Linux Security Settings and User Permissions 13 131
Problem logging tar errors 11 57
Image not there 4 53
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
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…
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.:
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.

776 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