Tuesday, November 4, 2014

Changing timezone in Solaris 11

How to change timezone on Solaris 11
root@SunSolaris11:/fmacdata# svccfg -s timezone:default setprop timezone/localtime= astring: US/Eastern
root@SunSolaris11:/fmacdata# date
Thursday, October 30, 2014 11:55:43 AM EST
root@SunSolaris11:/fmacdata# svcadm refresh timezone:default
root@SunSolaris11:/fmacdata# date
Thursday, October 30, 2014 12:55:55 PM EDT

-----------------------------------

root@SunSolaris11:/apps# date
Thursday, October 30, 2014 11:53:22 AM EST
root@SunSolaris11:/apps# grep TZ /etc/default/init
TZ=localtime
root@SunSolaris11:/apps# svccfg -s timezone:default setprop timezone/localtime= astring: US/Eastern
root@SunSolaris11:/apps# date
Thursday, October 30, 2014 11:55:43 AM EST
root@SunSolaris11:/apps# svcadm refresh timezone:default
root@SunSolaris11:/apps# date
Thursday, October 30, 2014 12:55:55 PM EDT
root@SunSolaris11:/apps# grep TZ /etc/default/init
TZ=localtime
root@SunSolaris11:/apps# svccfg -s svc:/system/environment:init
svc:/system/environment:init> list
:properties
svc:/system/environment:init> listprop
umask                              application
umask/umask                       astring     022
umask/value_authorization         astring     solaris.smf.value.environment
environment                        application
environment/LC_ALL                astring
environment/LC_COLLATE            astring
.....................
svc:/system/environment:init> quit
root@SunSolaris11:/apps# cat /etc/default/init
CMASK=022
TZ=localtime
LANG=en_US.UTF-8
root@SunSolaris11:/apps# svcadm refresh timezone:default
root@SunSolaris11:/apps# svcadm refresh svc:/system/environment
root@SunSolaris11:/apps# grep TZ /etc/default/init
TZ=US/Eastern
 

No comments:

Post a Comment