• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1628
  • Last Modified:

UTC Time on UNIX?

1. I have a UNIX box and my Hardware clock is set to UTC and including the displayed  clock also is set to a TZ=UTC...Is this the preferrable way of setting the time on UNIX boxes so when Daylight Savings Time changes occur I will not have any conflicts...right??? Right now..I have the current settings: Hardware Clock (RTC) is set to UTC, and the displayed time is also set in UTC (TZ=UTC)...

Is this the best settings for a NON-Dual-boot UNIX box?

2. Now suppose I had a dual-boot system now, running Windows and UNIX. Now in this case, what would be preferrable to use to avoid DST problems? Can I still set the Hardware clock as UTC and in UNIX the DISPLAYED time also as UTC (TZ=UTC) and leaving the displayed time in Windows as local time? Because I do not want any conflicts during DST changes...

3. On a standard UNIX box, is it preferrable or the best to set the DISPLAYED time also as UTC...like this >>(TZ=UTC)....and ALSO leaving the RTC or Hardware Clock as UTC too?

4. So can someone please explain what is the most easiest to use as far as the RTC clock and the displayed time for a NON-Dual boot system (UNIX only) and for a DUAL-boot system (Windows/UNIX). I really want to avoid DST troubles again...

And I do really wish to keep the RTC as UTC time..period.

I would appreciate the replies to be answered according to the numbering please so I can know which question's answer is answered...Please. Thanks


I would appreciate it.
0
slajoh01
Asked:
slajoh01
  • 9
  • 5
  • 2
  • +2
1 Solution
 
ozoCommented:
Unix time returns non leap seconds since 1970-01-01T00:00:00
regardless of your timezone, so Daylight Savings Time changes should not create any conflicts
TZ is only used when displaying the time.
the command
date -u
or the system call gmtime will give the time in UTC in any timezone.
0
 
slajoh01Author Commented:
So what would be the proper time settings for a dual-boot Windows/Solaris box??

Ok......My current settings are these in a dual-boot system:

1. RTC clock is set to UTC

2. Windows is set to show Local Time...with the check-box checked to "adjust dst time automatically"

3. Solaris shows UTC....

When DST changes occur I want to avoid problems....What should I do at this point because right now I dont know what to do to solve these DST change problems for both OS..

I do want my CMOS or RTC clock to be on UTC and also the displayed time in Solaris to be UTC too...

I want Windows..to be showed in LOCAL TIME...




0
 
slajoh01Author Commented:
This is SOOOOOOO confusing that Im in a total loss here...

I want the current settings on my machine...like this:

1. RTC clock is set to UTC
2. Windows is set to show Local Time...with the check-box checked to "adjust dst time automatically"
3. Solaris shows UTC....

What would be the proper time settings for both Hardware clock and the displayed times for both OSs??

I want to avoid DST change issues....

And also remember...I DO want my displayed time in Solaris to be shown in UTC instead of local....like this: TZ=UTC....Now....my "zone info" is also set as UTC....Ok. thats fine...

But what should I do with Windows now? I want to keep Windows as local time...But should I leave that checkbox marked as "ADJUST CLOCK TO DST AUTOMATICALLY" or not???

I am very confused and I want to VOID ANY TIME ISSUES FOR BOTH OS ON THE NEXT DST TIME CHANGES...



0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
slajoh01Author Commented:
My current settings are:

1. RTC clock is set to UTC
2. Windows is set to show Local Time...with the check-box checked to "adjust dst time automatically"
3. Solaris shows UTC....
4. Solaris also shows the "ZONE INFO" as UTC..

So..what should I do in general...PLEASE???

Should I leave these settings or what do I need to adjust in order to prevent DST problems???

0
 
slajoh01Author Commented:
I want to leave these settings under Solaris as these:

1. ZONE INFO=UTC
2. TZ=UTC...

THATS ALL I WANT...

Now, I want WIndows to show LOCAL TIME (as the displayed time) WITHOUT any problems during DST....

How can I accomplish this?
0
 
gheistCommented:
You cannot.
Only posibility is syncing over NTP, so windows set clock to local time and Solaris sets back to UTC.
Have a look at http://www.vmware.com or http://fabrice.bellard.free.fr/qemu/ , maybe you do not have to reboot every day ten times.
0
 
gheistCommented:
Best setting for UNIX is UTC. Some can adapt to windowish dualbooting with offset local clock.
Then there is system default timezone /etc/localtime which is used by cron, init and friends. it is advisable to set that to localtime when all users are in same TZ or to UTC when users are in multiple timezones. Every user then overrides timezone and locale as they or helpful admin wish.
Some types of crontab uses user timezone and posts job in their time, some require to calculate offset.
date -u always shows UTC time no matter setup.
0
 
slajoh01Author Commented:
Gheist -- You QUOTED THIS >>" Best setting for UNIX is UTC."

Do you mean the Internal BIOS system time should be UTC?? Or, the actual operating system should be set to UTC?? Please explain on what you meant by that statement please..

Now I switched back the settings as follows:

1. I set Solaris displayed time back to local time as TZ=US/Pacific...But, the "ZONE INFO" is still set to UTC..

2. Windows is also local time with the box that says "adjust dst time automatically" UNCHECKED...

3. The Internal BIOS Clock is still set to UTC..As I have been checking the BIOS...

I do not want my times to be synced with NTP servers..I just do not want to...

So what should I do??? Just leave it like this or do changes?





0
 
slajoh01Author Commented:
Gheist -- You QUOTED THIS >>" Best setting for UNIX is UTC."

Do you mean the Internal BIOS system time should be UTC?? Or, the actual operating system should be set to UTC?? Please explain on what you meant by that statement please..


When people say the best time setting for UNIX is UTC...do they mean the BIOS RTC Clock or the actual displayed OS time??
0
 
slajoh01Author Commented:
So i am a bit lost here again on what to do here...And I do not want to use any NTP servers... Like I said, I changed the settings for BOTH OSs to local time like this below. Will this cause any issues during DST changes? If yes, please post on what to do or change from the settings below please. Thanks.

1. I set Solaris displayed time back to local time as TZ=US/Pacific...But, the "ZONE INFO" is still set to UTC..

2. Windows is also local time with the box that says "adjust dst time automatically" UNCHECKED...

3. The Internal BIOS Clock is still set to UTC..As I have been checking the BIOS...

 Gheist -- You QUOTED THIS >>" Best setting for UNIX is UTC."

Do you mean the Internal BIOS system time should be UTC?? Or, the actual operating system should be set to UTC?? Please explain on what you meant by that statement please..


When people say the best time setting for UNIX is UTC...do they mean the BIOS RTC Clock or the actual displayed OS time??



0
 
gheistCommented:
1) This makes no difference, you can set sustem time to US/Pacific if you do not use many timezones
2) This does not change anything - windows keeps local time in system clock
3) It is set to some value no corrections stored.

UNIX has long record using UTC in kernel and on mainboard chips, with full adjustments needed to suit users.
Windows on the other hand always keep local time on mainboard chip, and resets that time as it wishes.

This can be solved by both systems setting time from NTP server at boot.
0
 
slajoh01Author Commented:
Military systems that run UNIX (e.g.
Trusted Solaris, HP-UX), are those systems kept on UTC time both for
Hardware clock and the actual displayed clocks? Or, its only the
Hardware clock that is set to UTC and the actual displayed times are in
Local Time? Or, both?
0
 
ozoCommented:
The Unix system clock is always based on 1970-01-01T00:00:00 UTC (although it is possible to have a system clock that is set incorrectly)
setting TZ in Unix does not change the system clock, it only changes the way localtime is displayed.
0
 
slajoh01Author Commented:
So is this the right way to have it set?

1. My machine's BIOS or Hardware Clock is set to UTC, and the TZ file is set to TZ=US/Pacific.

2. And of course, Windows displayes time on the desktop is set to local time with the local time zone and the "Automatically adjust clock for DST" check-box is CHECKED...

Is this right?
0
 
ahoffmannCommented:
> So what would be the proper time settings for a dual-boot Windows/Solaris box??
either remove unreliable systems (windows in this case), or set your hardware clock to the local timezone, which implies that your clock in UNIX is localtime too and you have to set your TZ to GMT+0
0
 
gheistCommented:
2. That checkbox is irreleavant to case mentioned.
0
 
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:

Accept gheist http:#16462255

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:
slajoh01, see you other (at least 2) question about UTC and BIOS clock settings too ...
0
 
GranModCommented:
PAQed with no points refunded (of 500)

GranMod
Community Support Moderator
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 9
  • 5
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now