Changing timezone in Solaris 10

This item was filled under [ General, Interview Help Solaris, Solaris ]

Changing timezone is different on x86 machines and on Solaris servers. I have listed the steps for both platforms below.

Solution for Solaris 10 x86:
As changing TimeZone on Solaris machine requires reboot, so plan a downtime and then plan the change activity. If one is changing only time, then one can use date command with required options. Also point to note here in both cases is that, changing time only, does not require reboot where as you would have to reboot the Solaris machine in case of changing TimeZone.

Changing TimeZone is 3 step process as listed below:

Issue “date” command to check which TimeZone you are currently in according to system.

# date
Thu Apr 23 20:16:13 IST 2009
#

1. Change the TimeZone entery in /etc/TIMEZONE file for the field of TZ

# TZ=US/Pacific (for PDT or any other format for specific TimeZone.)

One can list all TimeZones in directory : /usr/share/lib/zoneinfo.

2. Use following commands for changing TimeZone:

# rtc -z US/Pacific
# rtc -c
#

3. Reboot the system and after system is up and running issue the “date” command and check for the changes.

This is the output which I got on my machine:

Sun Microsystems Inc.   SunOS 5.11      snv_79a January 2008
# date
Thu Apr 23 20:47:23 PDT 2009
#

For Solaris 10 server:

On server there is only one change which has to be done. Just cahnge /etc/TIMEZONE file and edit TZ entry to proper TimeZone and reboot the server. Changes will be apparent after the reboot.

Please leave a feedback and subscribe to feeds for more updates for any query. HAPPY SURFING. [:D]

  • Share/Bookmark
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Comment

  • Google Translator

      Translate to: