zy:modify time zone

This commit is contained in:
lovelyzhang 2016-12-27 11:24:34 +08:00
parent 910246f78d
commit b42036399e
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@ module ApplicationHelper
def get_strftime intime def get_strftime intime
# 将数据库中的UTC时间转换为本地时间 # 将数据库中的UTC时间转换为本地时间
return intime.localtime.strftime(format='%F %T') return intime.utc.in_time_zone('Beijing').strftime(format='%F %T')
end end
end end