January 27, 2010

Solaris 10 local zone timezone issue

Posted in Solaris at 3:26 pm by alessiodini

Today i work with Gianluca on local zone timezone problem.
Connecting from global to local zone through zlogin i obtain:

#date
Wed Jan 27 15:03:08 GMT 2010 <— not correct
# echo $TZ
MEST

same command from global zone:

#date
Wed Jan 27 16:03:25 CET 2010 <— correct
#echo $TZ
Europe/Rome

Connecting directly to local zone with ssh , i obtain the same output of global zone.

So, where is the problem? As suggested by gianluca we check /etc/default/login , where we found:

[…]
# Set the TZ environment variable of the shell.
#
TIMEZONE=MEST
[…]

we check /etc/default/init , where we found:

#tail -2 /etc/default/init
TZ=Europe/Rome
CMASK=022

So , modifying /etc/default/login is useful for solving this problem because zlogin read this file during connection šŸ™‚

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: