Trying to change the system time, but no luck at all..

I have searched in many many places and I think you cannot adjust the time for Solaris 10 x86 on a CDE desktop...THIS IS VERY IMPORTANT TO MY APPLICATIONS FOR LOGGING....So please, will someone please post a reply ASAP? I am using Solaris 10 on Intel and I am using CDE. Ever since DST, my clock is very off by one hour ahead...I am dual-booting with Windows 2000 and because thats the case, is that the problem? Because in Windows, the timezone is set to adjust DST automatically...So, is there any way to adjust the CDE clock in Solaris because I am in a total lost here. I have been in 5 forums, and nobody knows and I searched google and nothing came up. Also searched in Sun.docs pages and nothing about adjusting the system clock in CDE..Is there a command for this?

This is very urgent since all of my apps have to be logged by time.

Thanks

EDIT>>> No need to reply...I got it working after hours of searching:

Its actually:

# date HHMM

thats it.
slajoh01Asked:
Who is Participating?
 
NopiusConnect With a Mentor Commented:
In Solaris system time is always UTC.
Your system should not ajust system clock, but every program that need local time should use localtime() or similar function calls to get local time (adjusted to UTC)

Your default timezone is located in file /etc/TIMEZONE
where you can find variable like this:
 
TZ=Asia/Vladivostok

It's a zone file name, relative to /usr/share/lib/zoneinfo dir

Also there where recent patches to Solaris where zoneinfo files where updated according to latest changes (it was in March).
0
 
ahoffmannCommented:
while Solaris uses a reliable method to query and adjust date/time, windows relies on the BIOS and also sets the time in the BIOS.
So, if you dual boot, then you have to tell Solaris that the BIOS time is your localtime and not UTC. Simply set in /etc/TIMEZONE:
TZ=GMT
0
 
yuzhConnect With a Mentor Commented:
just add a bit more details to the previous comments.

To change the TIMEZONE for your system:

1.have a look at  a list of the TIMEZONE you can use:
   ls /usr/share/lib/zoneinfo
2. edit /etc/TIMEZONE file, change the TZ variable (I've done this)
  you might need to change the LC_TIME var if required

3.reboot

PS: You can use different timezone for the applications, eg:
define the ENV var TZ in the application user's .profile
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
gheistCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
I will leave the following recommendation for this question in the Cleanup topic area:

Split between Nopius #16357824 and yuzh #16358573

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

gheist
EE Cleanup Volunteer
0
 
ahoffmannCommented:
I guess that my comment is as valuabel is the others, someone disagrees?
0
 
ahoffmannCommented:
0
 
yuzhCommented:
I agreed with ahoffmann. Since the system is dual boot
M$ Windows could reset the BIOS time and cause problem.
0
 
gheistCommented:
I cannot agree - the actual system time unlike in other cases in this case will be wrong.
0
 
gheistCommented:
Actually all the dupes should be reduced. Sorry for not noticing.
0
 
ahoffmannCommented:
> ..  the actual system time unlike in other cases in this case will be wrong.
what du you mean?
0
All Courses

From novice to tech pro — start learning today.