OS2 World Community Forum
OS/2, ArcaOS and eComStation - Warp Community
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
OS2World.com Forum is back !!!
Remember to visit OS2World at:
http://www.os2world.com
Home
Help
Search
Login
Register
OS2 World Community Forum
»
OS/2, eCS & ArcaOS - Technical
»
Utilities
»
UTC time set utility
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: UTC time set utility (Read 3419 times)
adam
Jr. Member
Thank You
-Given: 0
-Receive: 4
Posts: 62
Karma: +0/-0
UTC time set utility
«
on:
January 30, 2015, 03:26:27 am »
Hi everyone, I was looking for a internet time utility that would sync the clock to
utc
and not local time. I tried daytime but that sets it to local time.
Logged
Neil Waldhauer
Hero Member
Thank You
-Given: 12
-Receive: 53
Posts: 685
Karma: +4/-0
Re: UTC time set utility
«
Reply #1 on:
January 30, 2015, 03:44:29 am »
Just set TZ to UTC0 and Daytime will set to UTC.
Logged
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com
adam
Jr. Member
Thank You
-Given: 0
-Receive: 4
Posts: 62
Karma: +0/-0
Re: UTC time set utility
«
Reply #2 on:
January 30, 2015, 01:50:01 pm »
Thanks Neil for the suggestion but I have clocks that do respect the TZ variable and adjust for DST so that would be awkward. I noticed that the daytime package I downloaded also has the source to it so I think I will take a look at that.
Logged
Alex Taylor
Sr. Member
Thank You
-Given: 12
-Receive: 19
Posts: 291
Karma: +0/-0
Re: UTC time set utility
«
Reply #3 on:
January 30, 2015, 02:29:47 pm »
Try wrapping daytime in a script (or possibly a DTProgram object, or use RUN!) that sets TZ=UTC0 for that session only.
Logged
adam
Jr. Member
Thank You
-Given: 0
-Receive: 4
Posts: 62
Karma: +0/-0
Re: UTC time set utility
«
Reply #4 on:
January 30, 2015, 04:55:20 pm »
Thanks Alex, I will consider that. It certainly is not a problem to do. I still will look into the daytime source.
Logged
adam
Jr. Member
Thank You
-Given: 0
-Receive: 4
Posts: 62
Karma: +0/-0
Re: UTC time set utility
«
Reply #5 on:
January 31, 2015, 03:02:36 pm »
Okay, I did look at the latest source for daytime I got off of Hobbes. It was just a matter of switching from using localtime() to gmtime() in one line of code.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
OS2 World Community Forum
»
OS/2, eCS & ArcaOS - Technical
»
Utilities
»
UTC time set utility