How can I make timestamp() store datetime in a local time?
I’ve been renewing a sort of community site written in PHP to Phoenix. As the service is used only in Japanese, and the existing records in DB(MySQL) have datetime column in JST( UTC + 9hour = JST, by the way). Also the timezone in the node is JST(/etc/localtime is /usr/share/zoneinfo/Asia/Tokyo).
Though the node works on the local timezone(JST), timestamp()
in Ecto still stores the column, inserted_at
and updated_at
, in UTC.
I don’t have to consider the other timezone except for JST, so I want to fix all datetime(DB, application and return value sent to users) in JST, not in UTC.