File obs-server-2.10-0111-Use-to_time-behaviour-introduced-in-ruby-2.4.patch of Package obs-server

From f63e563823655dce70c733616ed63d0eb5597e9e Mon Sep 17 00:00:00 2001
From: Lukas Krause <>
Date: Fri, 14 Feb 2020 13:13:42 +0100
Subject: [PATCH] Use to_time behaviour introduced in ruby 2.4
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Since ruby 2.4 the to_time method preserve receiver’s
timezone offset instead of it's own system timezone
offset. This was a breaking change in rails 5.0 and got
manually disabled at the upgrade of OBS.
Turns out the only place where to_time is used, is the
issue_tracker model. Since the datetime entry for the
issue_tracker is set by the OBS frontend, its fine to
enable the default behaviour, since the timezone offset
doesn't differ.
 src/api/config/initializers/new_framework_defaults.rb | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/api/config/initializers/new_framework_defaults.rb b/src/api/config/initializers/new_framework_defaults.rb
index 8d8a6d4df8..b557d1218e 100644
--- a/src/api/config/initializers/new_framework_defaults.rb
+++ b/src/api/config/initializers/new_framework_defaults.rb
@@ -11,7 +11,3 @@ Rails.application.config.action_controller.per_form_csrf_tokens = false
 # Enable origin-checking CSRF mitigation. Previous versions had false.
 Rails.application.config.action_controller.forgery_protection_origin_check = false
-# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
-# Previous versions had false.
-ActiveSupport.to_time_preserves_timezone = false