time/date Command
< Newer Topic
:: Older Topic >
Pages:<< prev 1 next >>
#1 Jun 13, 2013 8:57 am
Fledgling
GroupMembers
Posts8
JoinedJun 7, 2013
<24hp 145m 110mv> <#1200> date
It is 8 o'clock am, Day of the Great Gods, 13th day in the Month of the Great Evil.
It is the season of winter, in the year 622.
The mud started up at : Wed Jun 12 10:05:47 2013
The system time : Thu Jun 13, 2013 7:41:51 AM MDT
Your local time : Wed Jun 12, 2013 6:41:51 PM Mountain US
Wait...what? I, the machine I'm using and the game that's running on it are all in the same time zone. Date recognizes that we're in the same timezone. Why are the dates and days different?
It was originally on GMT-12 for timezone and I changed it during the current boot. Checking for memory and file usage since I commented out the auto reboot code and recompiled, but should the timezone information correct itself after a mud restart?
#2 Jun 13, 2013 12:32 pm
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005
The "system" time is correct, using Mountain Daylight Time. The "local" time is using a hard coded fixed offset, which will be wrong for half the year because of Daylight Savings Time adjustments.
IE: either make everything use the system's time, as it should, or you're going to manually adjust twice a year as the offset changes.
IE: either make everything use the system's time, as it should, or you're going to manually adjust twice a year as the offset changes.
#3 Jun 13, 2013 2:38 pm
Fledgling
GroupMembers
Posts8
JoinedJun 7, 2013
Sure, I understand that local time is going to be out of sync with system by an hour during Daylight Savings. It's just that local time appears to be 13 hrs behind. I've just rebooted and local time is still 13 hrs behind system time.
No problem. I just find 13 hours difference odd. Of course, Daylight Savings is odd....
"Quixadhal" said:
IE: either make everything use the system's time, as it should, or you're going to manually adjust twice a year as the offset changes.
No problem. I just find 13 hours difference odd. Of course, Daylight Savings is odd....
#4 Jun 13, 2013 5:25 pm
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005
Maybe the timezone offset is getting applied to a non-GMT time source, giving you a double offset (or something of that sort).
In any case, I'd just make a single known-working function for the time, and track down everywhere else in the code that tries to deal with time and make it all use that same function.
In any case, I'd just make a single known-working function for the time, and track down everywhere else in the code that tries to deal with time and make it all use that same function.
Pages:<< prev 1 next >>