Project

General

Profile

Actions

Defect #14658

closed

Wrong activity timezone on user page

Defect #14658: Wrong activity timezone on user page

Added by Toshi MARUYAMA over 13 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Category:
Activity view
Target version:
Resolution:
Fixed
Affected version:

Description

http://www.redmine.org/users/11192

I use Japanese standard time (+0900) on redmine.org.
#14653#note-3 note-3 should be on 2013-08-10.


Files

user-activity.png (38.3 KB) user-activity.png Toshi MARUYAMA, 2013-08-10 01:46
act.png (76.7 KB) act.png Toshi MARUYAMA, 2014-09-19 05:55
Defect_14658_Patch_Test_resultsScreenShots.zip (149 KB) Defect_14658_Patch_Test_resultsScreenShots.zip Screen Captures of 'Before' and 'After' patch kaz k, 2017-01-05 05:08

Related issues 3 (0 open — 3 closed)

Related to Redmine - Defect #1048: Day grouping on Activity view ignores user's time zoneClosedActions
Related to Redmine - Defect #10996: Time zones lost when upgrading from Redmine 1.4 to 2.0ClosedActions
Has duplicate Redmine - Defect #24707: Activity in User Profile shows incorrect date/time, dependent to Time zone ClosedActions

Updated by Toshi MARUYAMA over 13 years ago Actions #1

CI server time is a head of 2 hours.
Now, It is 2013-08-09 23:50 UTC.
But CI server time is Sat Aug 10 03:50:03 +0200 2013.
http://www.redmine.org/builds/index.html

Updated by Etienne Massip over 13 years ago Actions #2

  • Category set to Website (redmine.org)

Updated by Matthew Peterson over 12 years ago Actions #3

I'm fairly sure this is a duplicate of #1048

Updated by Toshi MARUYAMA about 12 years ago Actions #4

  • Category deleted (Website (redmine.org))

Updated by Toshi MARUYAMA about 12 years ago Actions #5

  • Related to Defect #1048: Day grouping on Activity view ignores user's time zone added

Updated by Toshi MARUYAMA about 12 years ago Actions #6

Matthew Peterson wrote:

I'm fairly sure this is a duplicate of #1048

No.
I mean this issue is on user page.
http://www.redmine.org/users/11192

Updated by Toshi MARUYAMA about 12 years ago Actions #7

Updated by Kit Grose almost 11 years ago Actions #8

This issue is affecting our installation too. Interestingly, it seems to only affect one of our users (not all). That user has the same timezone set in their preferences as everyone else.

When other users visit that user's page it shows up incorrectly, and when that user visits any other user's page, the times are shown correctly.

We have v2.3.0.stable installed, though.

Updated by Ewan Makepeace almost 10 years ago Actions #9

+1

Updated by Go MAEDA almost 10 years ago Actions #10

  • Category set to Activity view
  • Target version set to 3.2.5

This issue can be fixed by the following patch.
ActivitiesController#show have been fixed in r9726 (diff) in order to handle time zones properly. This patch applies the same fix to UsersController#show.

Index: app/controllers/users_controller.rb
===================================================================
--- app/controllers/users_controller.rb    (revision 16111)
+++ app/controllers/users_controller.rb    (working copy)
@@ -74,7 +74,7 @@
     respond_to do |format|
       format.html {
         events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 10)
-        @events_by_day = events.group_by(&:event_date)
+        @events_by_day = events.group_by {|event| User.current.time_to_date(event.event_datetime)}
         render :layout => 'base'
       }
       format.api

Updated by Go MAEDA almost 10 years ago Actions #11

  • Related to Defect #10996: Time zones lost when upgrading from Redmine 1.4 to 2.0 added

Updated by Go MAEDA almost 10 years ago Actions #12

  • Has duplicate Defect #24707: Activity in User Profile shows incorrect date/time, dependent to Time zone added

Updated by Jean-Philippe Lang almost 10 years ago Actions #13

  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Fix committed, thanks.

Updated by kaz k almost 10 years ago Actions #14

Hi, I came here from #24707.
I tested the patch in note 10 (#14658#note-10).
Environment
  • Redmine 3.1.1 (Windows) (not the target version :-) )
  • Time Zone of the viewer: GMT+09:00(Tokyo).

Result
The patch worked well. Attached is the screen captures of 'Before' and 'After' patch with comments (Zipped).

Thank you.

Updated by Go MAEDA almost 10 years ago Actions #15

kaz k, thanks for the screenshots.
This problem will be fixed in upcoming 3.2.5 / 3.3.2 / 3.4.0.

Your #24707 triggered me to investigate this issue. Thank you again.

Updated by Jean-Philippe Lang almost 10 years ago Actions #16

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom