From cc95469a1f9e5c2667b6d5d6bd63bede27e19a4c Mon Sep 17 00:00:00 2001 From: chiu Date: Wed, 1 Nov 2023 13:52:53 +0000 Subject: [PATCH] fix error for datetime newoffset --- app/models/ruling_weather_setting.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/ruling_weather_setting.rb b/app/models/ruling_weather_setting.rb index 27499c0..a545457 100644 --- a/app/models/ruling_weather_setting.rb +++ b/app/models/ruling_weather_setting.rb @@ -35,7 +35,7 @@ class RulingWeatherSetting res end def get_now_info(custom_location=nil,custom_dataid=nil,custom_observatory_name=nil) - time_now = DateTime.now.utc.new_offset(self.time_offset) + time_now = DateTime.now.new_offset(self.time_offset) today = time_now.strftime("%Y-%m-%d") host = "https://opendata.cwb.gov.tw" custom_dataid = custom_dataid || self.dataid