LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   Changing the clock in CDE? (https://www.linuxquestions.org/questions/solaris-opensolaris-20/changing-the-clock-in-cde-431163/)

as400 04-02-2006 10:31 PM

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

as400 04-02-2006 11:04 PM

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.

rkelsen 04-02-2006 11:22 PM

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.

as400 04-02-2006 11:29 PM

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..

as400 04-02-2006 11:37 PM

YOUR A LIFE SAVER....WOW...after all that...I just had to type in a few characters....Unbelivable!!!!!

thanks

as400 04-02-2006 11:52 PM

edit edit edit

jlliagre 04-03-2006 12:46 AM

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).

as400 04-03-2006 12:00 PM

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

as400 04-03-2006 04:36 PM

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..

as400 04-03-2006 10:17 PM

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!!!

jlliagre 04-04-2006 01:22 AM

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.

as400 04-04-2006 11:18 AM

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?

jlliagre 04-04-2006 11:45 AM

Please run both of these ksh commands and post their output:
Code:

date -u
TZ=PST8PDT date


as400 04-04-2006 11:50 AM

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..

as400 04-04-2006 11:55 AM

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.


All times are GMT -5. The time now is 11:07 PM.