2
저는 한국에 있습니다.ruby on rail에 시간대 오프셋 버그가 있습니까?
레일 버전은 내 환경에서 2.3.5
,
config.time_zone = 'Seoul'
config.active_record.default_timezone = 'Seoul'
created_at과 updated_at 값은 데이터베이스에서 현지 시간으로 삽입됩니다. 내가 model.created_at 또는 model.updated_at에 액세스 할 때, 값이 UTC +9로 이해하는
하지만, : 그래서 00
, 나는 데이터베이스에 모델을 삽입하고 값을 얻고, 두 값을 즉시 차이를 확인 이 레일의 버그
>> Time.now.to_datetime
=> Sun, 24 Jan 2010 21:28:03 +0900
# insert new Product. And check difference Time.now and Product.created_at immediately.
>> Product.last.created_at.to_datetime
=> Mon, 25 Jan 2010 06:12:51 +0900
인가 : 그것은 다른 우는 소리는?