Solved

Timezone changed on Solaris 5.9

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
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 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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

726 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