From a043f4f48f7659b44a21c50291e300b801862155 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 15 Jun 2011 16:55:28 +0400 Subject: [PATCH] Actually all times are in GMT already, so avoid conversion to prevent dst loosing. --- src/lua/lua_message.c | 2 -- src/lua/lua_task.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) 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 { -- 2.39.5