0
Time.now
2017-03-14 12:07:59 -0600
Time.now.dst?
true
tt = Time.parse(DateTime.strptime("03/14/2017 12:07AM", "%m/%d/%Y %I:%M%p").to_datetime.to_s)
2017-03-14 00:07:00 +0000
tt.class
Time
tt.dst?
false
DateTime.strptime(value, "%m/%d/%Y %I:%M%p").to_datetime.strftime("%Y-%m-%d %H:%M:%S").to_datetime.change(offset: '-0500').to_time.dst?
爲什麼日期時間轉換時失敗DST?
添加偏移量也失敗(請參閱上面的編輯) – user6337901