LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 04-02-2006, 10:31 PM   #1
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Rep: Reputation: 30
Changing the clock in CDE?


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?

Thanks
 
Old 04-02-2006, 11:04 PM   #2
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Original Poster
Rep: Reputation: 30
In Windows its OK..But in Solaris it shows one hour ahead...And NOBODY knows how to adjust the time...

I have been searching for 4 hours now.
 
Old 04-02-2006, 11:22 PM   #3
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,463
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
I could be wrong, but isn't the GUI (in your case CDE), just a front-end for the system time?

If you run:

# date MMDDhhmmCCYY.ss

Where MM = Month, DD = date, hh = hour, mm = minute, CC = century, YY = year and ss = seconds...

That should change the system clock to whatever you put in there, and the changes should show up in the GUI instantaneously, no?

Anyhow, as I said, I could be wrong but it is worth a shot.

As far as I'm aware, there are no GUI tools for changing the system time in any flavour of Unix. I'm happy to be corrected on this though.
 
Old 04-02-2006, 11:29 PM   #4
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Original Poster
Rep: Reputation: 30
So how would I set it??

What would be the century? Do I have to enter that in to or only the time? Show me a example of a command that would set my time to local 21:30 for example please..
 
Old 04-02-2006, 11:37 PM   #5
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Original Poster
Rep: Reputation: 30
YOUR A LIFE SAVER....WOW...after all that...I just had to type in a few characters....Unbelivable!!!!!

thanks
 
Old 04-02-2006, 11:52 PM   #6
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Original Poster
Rep: Reputation: 30
edit edit edit

Last edited by as400; 04-03-2006 at 12:08 AM.
 
Old 04-03-2006, 12:46 AM   #7
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
Originally Posted by rkelsen
I could be wrong, but isn't the GUI (in your case CDE), just a front-end for the system time?

If you run:

# date MMDDhhmmCCYY.ss

Where MM = Month, DD = date, hh = hour, mm = minute, CC = century, YY = year and ss = seconds...

That should change the system clock to whatever you put in there, and the changes should show up in the GUI instantaneously, no?

Anyhow, as I said, I could be wrong but it is worth a shot.

As far as I'm aware, there are no GUI tools for changing the system time in any flavour of Unix. I'm happy to be corrected on this though.
Two comments here:

The root cause of the OP problem is multiple systems adjusting the hardware clock to DST. This is wrong because another O/S in a multi-boot configuration has no way to know this adjustment has been done or not.

The solution of fixing the clock with the date command would only help for the next 6 month after which a new 1 hour shift will be observed.

Here is a non temporary fix to this problem (from Casper Dick's blog):

- tell Windows to use UTC:

Set the following registry key (it does not exist!)
Code:
HKLM/SYSTEM/CurrentControlSet/Control/TimeZoneInformation/RealTimeIsUniversal
(REG_DWORD = 1)
In the control panel with Day&Time settings, check the "automatically adjust" check box.

- tell Solaris to use UTC:
Code:
rtc -c -z UTC
That's it.

NTP should also be configured on both O/Ses to make sure the time is correct.

Finally, should someone really need it, Solaris provides a GUI to adjust the time. It's available with SMC (Solaris Management Console).
 
Old 04-03-2006, 12:00 PM   #8
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Original Poster
Rep: Reputation: 30
Interesting...But you know....I was thinking about using UTC all a long but I was too hestitant and now from reading your last post, Im actually going to do it for a change.

1. Now, would this solve my date and time settings for BOTH Windows and Solaris?

2. And also, how can I change the NTP settings for both Windows and Solaris? And how and to what? Also, do I have really need to change the NTP settings too on both OSs or not?

EDIT >>> Anyway, I really dont have to use the NTP...Because first of all, I disabled the Windows Time Service under the Services management anyway....Because for both Windows and Solaris, I really set the time manually by looking at the USNO Navy time management website, and i just set the times manually instead of both OSs using a time server to get the time...

But anyway...IF I REALLY NEED TO CHANGE the NTP settings, please say yes or no..And if yes, then please explain how on both OSs please..

thanks

Last edited by as400; 04-03-2006 at 12:13 PM.
 
Old 04-03-2006, 04:36 PM   #9
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Original Poster
Rep: Reputation: 30
Hello there again and thanks for the notes..

But the most important thing that I want to know here is that do I HAVE TO change the NTP thing or can I leave it alone?

Like I said, in Windows, I have disabled the Windows Time Service...But overall, I would still like to know if I really really need to have NTP configured or not...? If NOT, I can just set the time manually and thats all. The TimeZones I fully understand on how to change. But if I do need to configure NTP on both OSs, then please explain how..

So...if I only change the RTC to UTC for Windows/Solaris, what would happen without configuring NTP??

I really dont want to mess with the NTP, because I did do a search, and I just dont have the time to make or configure files for NTP on Solaris..Trust me..I will be lost if you explain..

Thanks..

And I HOPE nothing will happen WITHOUT setting the NTP...Please post an update ASAP please as I really need to get going on this..

Last edited by as400; 04-03-2006 at 05:00 PM.
 
Old 04-03-2006, 10:17 PM   #10
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Original Poster
Rep: Reputation: 30
Just a firendly reminder here...Can we please keep this thread moving along please? I hate to say this, but I really need to figure out that if the UTC settings on both O/Ses will work or not even without configuring the NTP.

After when setting both of the O/Ses to tell the timezone in UTC, can I then continue setting the correct time manually with the date command that the other poster posted for me?

Please explain further. I would appreciate it. And sorry for the rant, but I had really thought about this in the past and I would like to configure this ASAP...

I fully understand on how to set the registry to call for UTC and such...but I need to know whether I can set the correct time even using the data command manually WITHOUT configuring the NTP. If I need to set the NTP for both, please explain how and where for both OSs please..Thanks!!!

Last edited by as400; 04-03-2006 at 10:18 PM.
 
Old 04-04-2006, 01:22 AM   #11
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
As already stated, you need not use ntp, it was only a advice.
I wrote "you should", not "you must", which I though was clear.

Setting the time with a wall clock is fine and will work for both Solaris and Windows.
 
Old 04-04-2006, 11:18 AM   #12
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Original Poster
Rep: Reputation: 30
Ok...something is very very wrong here.

I did exactly what you said on telling both OSs to use UTC...But after telling Solaris to use UTC, my time 02:15 instead of 16:15 UTC...I am located in the Pacific Time, so it would be 7 hours ahead of my location...Local time PDT time is 09:15...so why after the command shows 02:15??? It should say 16:15...

What am I doing wrong here?

Now, I did the date command of

# date 0915 and everything went back to normal again...

I did READ THROUGH your instructions exactly the way you told me on BOTH Windows and Solaris. So why after telling Solaris the UTC command what you wrote down showed me a time of 02:15 rather than 16:15 UTC???? I just dont get it... Remember, I am in the Pacific Standard Time Zone...So it should be 7 hours ahead...
So please explain the time error on what Im getting please.

Wouldn't it be better to set the UTC in Windows by using the Date/Time settings and then UNCHECK the "ADJUST TO DST AUTOMATICALLY"? Because UTC is constant and does not need to be changed.

But still...please answer this question if you would on why my clock was changed to 02:15 rather than to 16:15 UTC after I followed your instructions?

Last edited by as400; 04-04-2006 at 11:41 AM.
 
Old 04-04-2006, 11:45 AM   #13
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Please run both of these ksh commands and post their output:
Code:
date -u
TZ=PST8PDT date
 
Old 04-04-2006, 11:50 AM   #14
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Original Poster
Rep: Reputation: 30
Ok...I cannot run these commands because now Im in Windows..but soon as I get back to Solaris I will..

But after the telling Solaris to that UTC command what you posted, I did in fact changed it back to local time using that date command..

But even though the registry shows (1)..I do still have the local time as the right time...

So hold on..I will boot into the other OS..

Last edited by as400; 04-04-2006 at 11:51 AM.
 
Old 04-04-2006, 11:55 AM   #15
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Original Poster
Rep: Reputation: 30
Ok...im Back To Solaris Again...

Heres the output:

$ date -u
Tue Apr 4 16:54:47 GMT 2006
$ TZ=PST8PDT date
Tue Apr 4 09:55:11 PDT 2006

I hate to say this..but please reply ASAP..Because I have to go somewhere. And please explain what the issue was after following your instructions...Why did the clock go to 02:15 instead of 16:15?

I need to know what to do next and why the problem occurred under Solaris and WIndows..(because Windows was showing local time) even though I entered (1) in the new registry tweak that you told me to do.

Ok...wait a second!!!! I think I know whats going on here...

Under Solaris..I just figured it out..It may of thought I was going BACK 7 HOURS INSTEAD OF AHEAD 7 HOURS...So...09 - 02 WOULD be in fact -7 hours...But still thats not right.

Last edited by as400; 04-04-2006 at 12:04 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
System clock correct, hardware clock wrong karlovac Linux - General 5 01-16-2009 07:19 PM
the amazing, incredible, changing clock! BrianNJ Linux - Software 7 07-03-2006 10:17 PM
Linux OS Clock/Timezone shows the clock off by 6 hours between OS's JBailey742 Linux - Software 9 04-06-2006 11:40 PM
Preventing Debian from changing time on hardware clock reddazz Debian 6 04-12-2005 07:45 PM
Changing Cpu clock/frequency on fly carl0ski Linux - Software 0 11-14-2004 06:00 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 04:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration