Login
User Name:

Password:



Register

Forgot your password?
do_owhere recursive
Author: Khonsu
Submitted by: Khonsu
Changes list / Addchange
Author: Khonsu
Submitted by: Khonsu
6Dragons mp3 sound pack
Author: Vladaar
Submitted by: Vladaar
AFKMud 2.2.3
Author: AFKMud Team
Submitted by: Samson
SWFOTEFUSS 1.5
Author: Various
Submitted by: Samson
Users Online
AhrefsBot, Bing, Yandex

Members: 0
Guests: 10
Stats
Files
Topics
Posts
Members
Newest Member
489
3,794
19,649
596
Elwood

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » Codebases » SmaugFUSS » time/date Command
Forum Rules | Mark all | Recent Posts

time/date Command
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jun 13, 2013 8:57 am   
Go to the top of the page
Go to the bottom of the page

Krell
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?

Post is unread #2 Jun 13, 2013 12:32 pm   
Go to the top of the page
Go to the bottom of the page

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

Post is unread #3 Jun 13, 2013 2:38 pm   
Go to the top of the page
Go to the bottom of the page

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

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

Post is unread #4 Jun 13, 2013 5:25 pm   
Go to the top of the page
Go to the bottom of the page

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

Pages:<< prev 1 next >>