Project

General

Profile

Actions

Defect #10098

open

last_login_on set to wrong time when config.active_record.default_timezone = :utc

Added by Nickolay Mischenko almost 13 years ago. Updated over 4 years ago.

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
  1. Set config.active_record.default_timezone = :utc in config/enviroment.rb
  2. Login with administrative user, go Administration -> Users
  3. 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

Also available in: Atom PDF