aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-06-15 16:55:28 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-06-15 16:55:28 +0400
commita043f4f48f7659b44a21c50291e300b801862155 (patch)
tree63564eb33af8ac081d6a5d47f67f5cf14ff9eccb /src
parent133f27e620f19bb2d10714edb8a97ff01e4201d8 (diff)
downloadrspamd-a043f4f48f7659b44a21c50291e300b801862155.tar.gz
rspamd-a043f4f48f7659b44a21c50291e300b801862155.zip
Actually all times are in GMT already, so avoid conversion to prevent dst loosing.
Diffstat (limited to 'src')
-rw-r--r--src/lua/lua_message.c2
-rw-r--r--src/lua/lua_task.c2
2 files changed, 1 insertions, 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 {
pan> :plugins, :only => :plugin helper :queries before_filter :require_admin def index edit render :action => 'edit' end def edit @notifiables = Redmine::Notifiable.all if request.post? && params[:settings] && params[:settings].is_a?(Hash) settings = (params[:settings] || {}).dup.symbolize_keys settings.each do |name, value| Setting.set_from_params name, value end flash[:notice] = l(:notice_successful_update) redirect_to settings_path(:tab => params[:tab]) else @options = {} user_format = User::USER_FORMATS.collect{|key, value| [key, value[:setting_order]]}.sort{|a, b| a[1] <=> b[1]} @options[:user_format] = user_format.collect{|f| [User.current.name(f[0]), f[0].to_s]} @deliveries = ActionMailer::Base.perform_deliveries @guessed_host_and_path = request.host_with_port.dup @guessed_host_and_path << ('/'+ Redmine::Utils.relative_url_root.gsub(%r{^\/}, '')) unless Redmine::Utils.relative_url_root.blank? @commit_update_keywords = Setting.commit_update_keywords.dup @commit_update_keywords = [{}] unless @commit_update_keywords.is_a?(Array) && @commit_update_keywords.any? Redmine::Themes.rescan end end def plugin @plugin = Redmine::Plugin.find(params[:id]) unless @plugin.configurable? render_404 return end if request.post? Setting.send "plugin_#{@plugin.id}=", params[:settings] flash[:notice] = l(:notice_successful_update) redirect_to plugin_settings_path(@plugin) else @partial = @plugin.settings[:partial] @settings = Setting.send "plugin_#{@plugin.id}" end rescue Redmine::PluginNotFound render_404 end end