Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!

Members: 0
Guests: 12
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » 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, 6: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, 10:32 am
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, 12: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, 3: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 >>