summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorMadCamel <madcamel@gmail.com>2009-04-26 20:15:52 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-05-03 13:01:33 +0200
commit1a284890a23188378db268500eb406f5505ff81b (patch)
tree225c681087c44f674bf3597f42b92fd541444c2d /src/map/script.c
parente443b683ed7e38648b61e4e52d87e681d194a2b3 (diff)
downloadtmwa-1a284890a23188378db268500eb406f5505ff81b.tar.gz
tmwa-1a284890a23188378db268500eb406f5505ff81b.tar.bz2
tmwa-1a284890a23188378db268500eb406f5505ff81b.tar.xz
tmwa-1a284890a23188378db268500eb406f5505ff81b.zip
Changed all times to use UTC
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/script.c b/src/map/script.c
index a8d9a83..48071d0 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -3437,7 +3437,7 @@ int buildin_gettimetick(struct script_state *st) /* Asgard Version */
case 1:
//type 1:(Second Ticks: 0-86399, 00:00:00-23:59:59)
time(&timer);
- t=localtime(&timer);
+ t=gmtime(&timer);
push_val(st->stack,C_INT,((t->tm_hour)*3600+(t->tm_min)*60+t->tm_sec));
break;
case 0:
@@ -3465,7 +3465,7 @@ int buildin_gettime(struct script_state *st) /* Asgard Version */
type=conv_num(st,& (st->stack->stack_data[st->start+2]));
time(&timer);
- t=localtime(&timer);
+ t=gmtime(&timer);
switch(type){
case 1://Sec(0~59)
@@ -3511,7 +3511,7 @@ int buildin_gettimestr(struct script_state *st)
maxlen=conv_num(st,& (st->stack->stack_data[st->start+3]));
tmpstr=(char *)aCalloc(maxlen+1,sizeof(char));
- strftime(tmpstr,maxlen,fmtstr,localtime(&now));
+ strftime(tmpstr,maxlen,fmtstr,gmtime(&now));
tmpstr[maxlen]='\0';
push_str(st->stack,C_STR,tmpstr);