Setting timezone Sunos 5.8 & adjusting


 
Thread Tools Search this Thread
Operating Systems Solaris Setting timezone Sunos 5.8 & adjusting
# 1  
Old 04-23-2008
Setting timezone Sunos 5.8 & adjusting

I am new to this so i figure this is an easy one.. How do i change the time zone from Central to Eastern time in SunOS 5.8 ? I thought I needed to edit the /etc/TIMEZONE and them issue TZ=US/Eastern but I want to check. Is a reboot required afterwards?

If I want to change the system time should i just issue the date -a - sss.fff to slow it up??

Thank you
# 2  
Old 04-23-2008
The internal time of the OS should be exactly on UTC - do you not have ntpd or xntpd running?
If the system clock is off by a few seconds then
Code:
# slow down
date -a -sss.fff
#speed up
date -a sss.fff
# correct TZ value for Eastern Timezone in /etc/TIMEZONE
TZ=US/Eastern

You may find that the EDT <-> EST change occurs on the wrong day of the year - it just changed for the US.

For POSIX systems, changing TZ does change how the time is reported in any POSIX compliant command that looks at time values, like date or ls, for example.
# 3  
Old 04-24-2008
As SU I changed the time zone to EDT but it only held for a short while then went back to CDT. I did VI the /etc/TIMEZONE. What else did I miss??
# 4  
Old 04-24-2008
You missed to understand the previous reply.

You never change the system clock timezone on Unix. It is always UTC (a.k.a. GMT).

The way the clock is *displayed* depends on the environment variable TZ and so can vary on a per process basis. To view the correct timezone in your shell, just run:
Code:
TZ=US/Eastern
export TZ
date

If you want the default timezone to be set, you'll need to reboot.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Setting up Solaris & ZFS for the first time

Hello All I’ve made the decision to switch my storage server from FreeNAS to Solaris. I opted to use FreeNAS as it has ZFS and until BTRFS is stable, it’s the best option (IMHO) for backup and network storage. The switch was facilitated by the USB stick that FreeNAS was on got lost during a... (1 Reply)
Discussion started by: BlueDalek
1 Replies

2. Shell Programming and Scripting

Adjusting Dates

What is the easiest way to find the date 6 month prior to the current date. Example: Today is 2011/01/29 I need to find the 1st day of the month, 6 month ago, which is 2010/08/01. I have to count 1/1/2011 as a previous month, since the current day is past 1/1/2011. Is there any easy... (4 Replies)
Discussion started by: jclanc8
4 Replies

3. Programming

adjusting a code for Linuxconio.h

Hi All, I am using a book to learn C++. Unfortunately the book, sometimes, uses the maddening phrase, #include <conio.h>, which is a M$ related file and not a part of STL, in some of its examples. My question is: How would you modify the following code so it would compile and run on Linux?... (3 Replies)
Discussion started by: eager2no
3 Replies

4. UNIX and Linux Applications

Setting vi indentation to k&r style?

A bit of searching on Google did not seem to yield any really helpful results on how to set vim to use k&r indentation style. I know Emacs has such a feature, but does vim? If so, how do I turn it on? I am just starting to learn vi, and when I am coding in C it looks really ugly without some sort... (2 Replies)
Discussion started by: kermit
2 Replies

5. AIX

Timezone Setting

Hi On several AIX 5.3 LPARs the timezone is currrently set to: TZ=NZST-12NZDT,M9.5.0/02:00,M4.1.0/03:00 Daylight savings in NZ starts on Sun 28th Sep 2008, which is the fourth Sunday. Do I need to change my TZ variable to NZST-12NZDT,M9.4.0/02:00,M4.1.0/03:00 or will AIX interpret the fifth... (2 Replies)
Discussion started by: KiwiP
2 Replies

6. Shell Programming and Scripting

Adjusting the output in a file

QUERY SCENARIO Here is the actual scenario LOOP echo "$COLNAME $TYPENAME($LENGTH) $NULLS ">>$DDL_FILE END-LOOP COLNAME, TYPENAME, LENGTH, NULLS are the variables and within echo statment the output of which has to go into file specified by DDL_FILE. ... (1 Reply)
Discussion started by: skyineyes
1 Replies

7. Solaris

SunOS 5.6: timezone data patch

Does anyone know if there is a patch for SunOS 5.6 timezone update for new daylight savings times. I have looked and have updated my 5.8 machine. Can not find one for 5.6. I still use one box for a certian piece of hardware that can not use the newer versions. (6 Replies)
Discussion started by: vacomman
6 Replies

8. Solaris

Setting TImezone fr Hong kong

Hi, In solaris how to change the timezone to display to HKT I tried by putting TZ=Hongkong or TZ=Asia/Hong_kong but it is taking me to the display of CST. how to change it to HKT thanks Bala (1 Reply)
Discussion started by: Balamurugan
1 Replies

9. UNIX for Advanced & Expert Users

Migration of binary file from Sunos 5.8 to Sunos 5.9

I have compiled binary file using "cc" on SunOS 5.8 and the same binary file i have copied to SunOS 5.9 and it is giving me core dump error.I want to know whether migration of compiled code from lower version to higer version created this problem. how can i solve this problem.I am pasting the core... (1 Reply)
Discussion started by: Arvind Maurya
1 Replies

10. UNIX for Dummies Questions & Answers

What is the difference : SunOS & Solaris Version.

Sorry I think someone already pointed out this but I couldn't find it. Please tell me what is the difference between SunOS Version and Solaris Version. What is the purpose of maintaining these two things ? Thanks (2 Replies)
Discussion started by: champion
2 Replies
Login or Register to Ask a Question