From: Vsevolod Stakhov Date: Wed, 15 Jun 2011 12:55:28 +0000 (+0400) Subject: Actually all times are in GMT already, so avoid conversion to prevent dst loosing. X-Git-Tag: 0.4.0~49 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a043f4f48f7659b44a21c50291e300b801862155;p=rspamd.git Actually all times are in GMT already, so avoid conversion to prevent dst loosing. --- diff --git a/src/lua/lua_message.c b/src/lua/lua_message.c index c1b7a734f..70e33981b 100644 --- a/src/lua/lua_message.c +++ b/src/lua/lua_message.c @@ -191,8 +191,6 @@ lua_message_get_date (lua_State * L) if (obj != NULL) { g_mime_message_get_date (obj, &msg_time, &offset); - /* Convert result to GMT */ - msg_time -= (offset / 100) * 3600; lua_pushnumber (L, msg_time); } else { diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index 0931eb13c..2bb13083b 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -1074,7 +1074,7 @@ lua_task_get_date (lua_State *L) if (task != NULL) { /* Get GMT date and store it to time_t */ - task_time = mktime (gmtime (&task->tv.tv_sec)); + task_time = task->tv.tv_sec; lua_pushnumber (L, task_time); } else {