Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl

Members: 0
Guests: 8
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » Current_time/localtime questi...
Forum Rules | Mark all | Recent Posts

Current_time/localtime questions
< Newer Topic :: Older Topic > I'm feeling slightly ambitious :P

Pages:<< prev 1 next >>
* #1 Jul 19, 2011, 4:26 pm
Go to the top of the page
Go to the bottom of the page

Aurin
Magician
GroupMembers
Posts189
JoinedSep 5, 2010

Okay, so, I'm looking to fix the time that shows when I use the do_time function. I can't seem to figure out how to appropriately offset the time in relation to the servers localtime (it's behind by 5 hours, silly Zeno). Any guidance would be helpful.

Note: When I run it from MY computer via cygwin, the times come up appropriately, which means it's the server's clock that has the issue, and I'm just compensating for this until such a time that it's no longer needed.

Cheers,
Aurin
       
Post is unread #2 Jul 19, 2011, 5:20 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Yeah I have to fix that. I do, but it gets set back to the wrong timezone on reboot.

Anyway, you just add/subtract the seconds to the current time. So if you wanted to change the time by +5 hours, you'd do something like time = 18000+time(), I forget the exact function names.
       
Post is unread #3 Jul 19, 2011, 6:11 pm
Go to the top of the page
Go to the bottom of the page

Aurin
Magician
GroupMembers
Posts189
JoinedSep 5, 2010

Ahh...didn't realize I could simply do that. Thanks Zeno. :) Just wanted to have accurate times for people to use.
       
Pages:<< prev 1 next >>