fix error for datetime newoffset

This commit is contained in:
chiu 2023-11-01 13:52:53 +00:00
parent 0495a4af16
commit cc95469a1f
1 changed files with 1 additions and 1 deletions

View File

@ -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