Actions
Defect #10098
openlast_login_on set to wrong time when config.active_record.default_timezone = :utc
Status:
Confirmed
Priority:
Normal
Assignee:
-
Category:
Accounts / authentication
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
3.00 h
Resolution:
Affected version:
Description
reproduce
- Set config.active_record.default_timezone = :utc in config/enviroment.rb
- Login with administrative user, go Administration -> Users
- Last connection time is wrong
example
for me, I've logged in as admin in "01/01/2012 06:41 pm", my server zone is UTC+11, last connection time = "02/01/2012 05:43 am", admin user zone is UTC
value must be "01/01/2012 07:41 am"
solution?
Time.zone.now should be used instead of Time.now when user logged-in or autologged-in
Actions