]> source.dussan.org Git - rspamd.git/commitdiff
Actually all times are in GMT already, so avoid conversion to prevent dst loosing.
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Wed, 15 Jun 2011 12:55:28 +0000 (16:55 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Wed, 15 Jun 2011 12:55:28 +0000 (16:55 +0400)
src/lua/lua_message.c
src/lua/lua_task.c

index c1b7a734fa85186542ecbb47617faec0ddb65fed..70e33981b195aad79e0c10e5edc97cd01400b95d 100644 (file)
@@ -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 {
index 0931eb13cbc51d7a532d4ccf17d4cbbc5b98293d..2bb13083b60a1afce9cc03f3a665aa214f51112f 100644 (file)
@@ -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 {