summaryrefslogtreecommitdiff
path: root/src/map
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
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')
-rw-r--r--src/map/atcommand.c2
-rw-r--r--src/map/chrif.c2
-rw-r--r--src/map/clif.c6
-rw-r--r--src/map/npc.c2
-rw-r--r--src/map/pc.c2
-rw-r--r--src/map/script.c6
6 files changed, 10 insertions, 10 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 07751bd..a981607 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -5222,7 +5222,7 @@ int atcommand_servertime(const int fd, struct map_session_data* sd,
memset(temp, '\0', sizeof(temp));
time(&time_server); // get time in seconds since 1/1/1970
- datetime = localtime(&time_server); // convert seconds in structure
+ datetime = gmtime(&time_server); // convert seconds in structure
// like sprintf, but only for date/time (Sunday, November 02 2003 15:12:52)
strftime(temp, sizeof(temp)-1, msg_table[230], datetime); // Server time (normal time): %A, %B %d %Y %X.
clif_displaymessage(fd, temp);
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 40972f4..05fa603 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -805,7 +805,7 @@ int chrif_accountban(int fd)
char tmpstr[2048];
timestamp = (time_t)RFIFOL(fd,7); // status or final date of a banishment
strcpy(tmpstr, "Your account has been banished until ");
- strftime(tmpstr + strlen(tmpstr), 24, "%d-%m-%Y %H:%M:%S", localtime(&timestamp));
+ strftime(tmpstr + strlen(tmpstr), 24, "%d-%m-%Y %H:%M:%S", gmtime(&timestamp));
clif_displaymessage(sd->fd, tmpstr);
}
clif_setwaitclose(sd->fd); // forced to disconnect for the change
diff --git a/src/map/clif.c b/src/map/clif.c
index 25ce1d4..7a80bd2 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -8435,11 +8435,11 @@ static int clif_parse(int fd) {
if (sd && sd->state.auth) {
if (sd->status.name != NULL)
fprintf(fp, "%sPlayer with account ID %d (character ID %d, player name %s) sent wrong packet:\n",
- asctime(localtime(&now)), sd->status.account_id, sd->status.char_id, sd->status.name);
+ asctime(gmtime(&now)), sd->status.account_id, sd->status.char_id, sd->status.name);
else
- fprintf(fp, "%sPlayer with account ID %d sent wrong packet:\n", asctime(localtime(&now)), sd->bl.id);
+ fprintf(fp, "%sPlayer with account ID %d sent wrong packet:\n", asctime(gmtime(&now)), sd->bl.id);
} else if (sd) // not authentified! (refused by char-server or disconnect before to be authentified)
- fprintf(fp, "%sPlayer with account ID %d sent wrong packet:\n", asctime(localtime(&now)), sd->bl.id);
+ fprintf(fp, "%sPlayer with account ID %d sent wrong packet:\n", asctime(gmtime(&now)), sd->bl.id);
fprintf(fp, "\t---- 00-01-02-03-04-05-06-07-08-09-0A-0B-0C-0D-0E-0F");
for(i = 0; i < packet_len; i++) {
diff --git a/src/map/npc.c b/src/map/npc.c
index fa01d56..11725b3 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -349,7 +349,7 @@ int npc_event_do_clock(int tid,unsigned int tick,int id,int data)
int c=0;
time(&timer);
- t=localtime(&timer);
+ t=gmtime(&timer);
if (t->tm_min != ev_tm_b.tm_min ) {
sprintf(buf,"OnMinute%02d",t->tm_min);
diff --git a/src/map/pc.c b/src/map/pc.c
index 2ac5ce1..982adea 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -818,7 +818,7 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, short tmw_versio
// message of the limited time of the account
if (connect_until_time != 0) { // don't display if it's unlimited or unknow value
char tmpstr[1024];
- strftime(tmpstr, sizeof(tmpstr) - 1, msg_txt(501), localtime(&connect_until_time)); // "Your account time limit is: %d-%m-%Y %H:%M:%S."
+ strftime(tmpstr, sizeof(tmpstr) - 1, msg_txt(501), gmtime(&connect_until_time)); // "Your account time limit is: %d-%m-%Y %H:%M:%S."
clif_wis_message(sd->fd, wisp_server_name, tmpstr, strlen(tmpstr)+1);
}
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);