Thread Tools Display Modes
05-16-07, 10:29 AM   #1
yssaril
A Warpwood Thunder Caller
 
yssaril's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2007
Posts: 96
is there any method to optain the server date?

i am using the following syntax to obtain a timestamp
(date("%Y%m%d")*1000000)+(hour*10000)+(minute*100)+date("%S")
which gives something like 20070516111447
basically it is a number that has the year first then the month then the day of the month than the hour then the minute and then the seconds
so the timestamp given is year 2007 month 5 day 16 hour 11 minute 14 second 47

the problem i am having is that if i change my computer date the timestamp will change accordingly and thus if i change the year to 2009 for example and then get new info with a new timestamp send to me it would simply ignore it since it would think the 2009 one is newer than the 2007 one. also there is the issue of different time zones where one stamp might be say at 23:59 on the 16th while it is really 23:59 on the 15th server time thus preventing updates towards that database for 24hours

thus my question is is there anyway to get a date reading without using the computers own time? (i know the seconds are also system dependent but that is a minor issue since this would be fixed on the next time stamp)
  Reply With Quote
05-23-07, 11:13 PM   #2
Crepusculu
A Deviate Faerie Dragon
 
Crepusculu's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 16
You can request the server time GetGameTime(), but that only provides the hour and minutes. I'm not quite sure how to adjust for timezones. You might want to reconsider your update method if that's not enough.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » is there any method to optain the server date?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off