Solaris / OpenSolarisThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
There is nothing wrong with your date output.
Obviously, after telling the internal clock was no more set on local time but in universal time, a shift in what the date command was showing was observed, as the internal clock value hadn't change yet.
This was nothing but expected.
You rightly set the time to the correct value, using a wall clock, and now its okay.
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596
Original Poster
Rep:
Hold hold on.. So how come my clock does not show a 7 hour ahead time?? I thought the idea was to use UTC time??? So Im lost now...Very lost..So is my clock on UTC time or not? So we did all this for nothing? I still really want to the OS time in UTC for both. So your saying it cannot be done?
After reading your last post a dozen times...I am still lost.
Ok, Your saying that even my clock display in the CDE panel shows LOCAL TIME, my INTERNAL CLOCK is set to UTC?
How can I find that out? I dont understand
Ok, in both Windows and Solaris it still shows LOCAL TIME. But your saying my Internal clock should be UTC..right? I dont undertand. So why are my clock and time are still reading the time as LOCAL TIME?
But now, since I went back and did the whole DATE COMMAND thing, do I have to do those instructions again that you gave me?
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596
Original Poster
Rep:
Please dont go yet. I still have a question that needs to be followed up here.
I dont think we have done this the right way. Because after telling Solaris to use UTC doing that UTC command that you posted in your instructions, the time showed MINUS of 7 hours...instead of + 7 hours from my local time (09:15PDT - 02:15)
So would this mean that the INTERNAL clock would be MINUS 7 HOURS or PLUS 7 HOURS from my local time?
Please explain. Im sorry, but all of my apps need to be in UTC time and to solave the DUAL-BOOT OS time issues during the DST time changes...
And also, is there actually a way to tell if my INTERNAL CLOCK uses UTC time? How can I find out in both OSes?
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
Your internal clock is running in UTC, you can stop the boot process and look at the BIOS interface to verify it.
Both Windows and Solaris knows the internal clock is running in UTC.
The displayed clock depends on the current timezone, which is an environment variable under Solaris, thus for example "TZ=GMT date" and "TZ=MET date" shows different dates.
Your files timestamps are correct, and are internally stored using UTC (they are always stored that way), so "TZ=GMT ls -l" and "TZ=PRC ls -l" will give different timestamps for the same file.
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596
Original Poster
Rep:
Ok..I checked in the BIOS and it reads as 20:09 UTC...So my local time is 13:09 and the BIOS reads 20:09...So I got it...Its OK..
But, is there any way I can set the DISPLAYED time in both Windows and Solaris desktops to display time in UTC and have the INTERNAL CLOCK read UTC at the same time? Will setting the DISPLAYED time as we see in our desktops as UTC and plus having the INTERNAL CLOCK set as UTC, will that cause the time to behave incorrectly during DST Time? Or, should I leave ONLY the INTERNAL CLOCK as UTC and keep the displayed time as LOCAL???
So overall, what would happen during the next DST change assuming that I have BOTH the internal clock and the displayed time (on my desktops) set as UTC? Will I have conflicts even then or not?
Or, like I said, should I leave it the way it is leaving ONLY the INTERNAL CLOCK as UTC?
And if it will NOT have any conflicts, then please explain on how to set the DISPLAYED time as being UTC...I would appreciate it.
Also you quoted saying this below:
Quote:
Your files timestamps are correct, and are internally stored using UTC (they are always stored that way)
So how come when I do a command for all my error messages logs, then how come there timestamped in LOCAL TIME?
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
Quote:
Originally Posted by as400
But I do not want my files to be timestamped in different dates and time...I want all apps to be timestamped in UTC. Period.
And they are.
Quote:
Now i am still confused about why my displayed time settings are set in local time on both OS desktop panels?
I answered that, your TZ is set to pacific time, change the file /etc/default/init to contain "TZ=UTC" and reboot if you want your machine to show UTC time by default.
Quote:
Also, after telling Solaris to use UTC in the command you gave in the instructions, why did the time shifted from 09:15PDT to 02:15? Thats still MINUS 7 HOURS which is not correct. Its suppose to be PLUS 7 hours ahead from PDT.
You suppose wrong.
Quote:
For example, if I did a command of all my error log meassages, that would still be in local time..right?? Well, I do not want that. I want all my displayed time, my logs, my apps, my programs to be DISPlAYED in UTC and in the same time setting the INTERNAL CLOCK in UTC as well for both OSses.
Okay, I think I just answered that.
Quote:
Also, if we did it the right way according to the instructions (which I did), In Solaris, how would I know if the INTERNAL clock is set to UTC WITHOUT booting into the BIOS? I mean, I can check there...but is there any way to check inside the operating systems itself?
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596
Original Poster
Rep:
So overall, what would happen during the next DST change assuming that I have BOTH the internal clock and the displayed time (on my desktops) set as UTC? Will I have conflicts even then or not?
Or, should I leave it the way it is leaving ONLY the INTERNAL CLOCK as UTC?
And if it will NOT have any conflicts, then please explain on how to set the DISPLAYED time as being UTC...I would appreciate it.
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596
Original Poster
Rep:
Ok --- I got it..So whenever I decide to change the ACTUAL DISPLAY TIME AS UTC on the desktop..I would just edit the "TZ" to "TZ=UTC" where it says TZ=Pacific down below here:
Code:
#
# Copyright 1992, 1999-2002 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "@(#)init.dfl 1.7 02/12/03 SMI"
#
# This file is /etc/default/init. /etc/TIMEZONE is a symlink to this file.
# This file looks like a shell script, but it is not. To maintain
# compatibility with old versions of /etc/TIMEZONE, some shell constructs
# (i.e., export commands) are allowed in this file, but are ignored.
#
# Lines of this file should be of the form VAR=value, where VAR is one of
# TZ, LANG, CMASK, or any of the LC_* environment variables. value may
# be enclosed in double quotes (") or single quotes (').
#
TZ=US/Pacific
CMASK=022
LANG=C
Quote:
There is never a DST change in UTC, so there is no risk of conflict.
Then a quick last question regarding your quote above and I'll wrap this up...
Then why does the instrustions say to CHECK the "ADJUST FOR DST AUTOMATICALLY" in Windows then?
Also...should I leave it the way it is leaving ONLY the INTERNAL CLOCK as UTC? Or, I CAN have also my desktop clocks set as UTC too?
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
Quote:
Originally Posted by as400
Ok --- I got it..So whenever I decide to change the ACTUAL DISPLAY TIME AS UTC on the desktop..I would just edit the "TZ" to "TZ=UTC" where it says TZ=Pacific down below here:
correct
Quote:
Then a quick last question regarding your quote above and I'll wrap this up...
Then why does the instrustions say to CHECK the "ADJUST FOR DST AUTOMATICALLY" in Windows then?
Please ask that to a windows forum.
Quote:
Also...should I leave it the way it is leaving ONLY the INTERNAL CLOCK as UTC? Or, I CAN have also my desktop clocks set as UTC too?
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596
Original Poster
Rep:
You said that UTC time is constant...were it DOES NOT adjust during DST. So why do I need to CHECK were it says "adjust to dst time automatically" in the date/time settings in the control panel.
From the instructions:
Quote:
In the control panel with Day&Time settings, check the "automatically adjust" check box.
So is the next DST time channge occurs, Windows will probably move the display time back 1 hour and Solaris will stay the same and all will be different again.
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596
Original Poster
Rep:
I need Solaris to set the DISPLAYED time as UTC and Windows LOCAL...I've already set the INTERNAL CLOCK as UTC...thats fine...But now, Im asking that what if I set the displayed clock (on desktop) as LOCAL in Windows, and the clock panel in Solaris to UTC keeping the INTERNAL CLOCK as UTC??
Will this cause any conflicts? Or, both OSses need to be synchronized as LOCAL?
And I still dont understand on why I have to set to adjust DST time automatically in Windows if UTC does not adjust.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.