Defect #1048

Day grouping on Activity view ignores user's time zone

Added by Thomas Löber over 9 years ago. Updated 9 months ago.

Status:ClosedStart date:2008-04-12
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:UI
Target version:-
Resolution:Duplicate Affected version:

Description

On the Activity view the activities are grouped under the wrong day when the user's time zone is not equal to UTC+2.

For example when the user's time is UTC the activities from 22:00 to 23:59 are grouped under the following day.


Related issues

Related to Redmine - Defect #5091: User timezone is not honored everywhere Closed 2010-03-16
Related to Redmine - Defect #5425: Showing date in activity page is wrong Closed 2010-05-02
Related to Redmine - Defect #8889: Activity page not refreshed correctly on updates which ar... New 2011-07-23
Related to Redmine - Defect #14658: Wrong activity timezone on user page Closed
Duplicated by Redmine - Defect #2469: Date headers on Activity page don't honor the user's time... Closed 2009-01-08
Duplicated by Redmine - Defect #4851: Activity screen Day separators when server in another tim... Closed 2010-02-16
Duplicates Redmine - Defect #24707: Activity in User Profile shows incorrect date/time, depen... Closed

History

#1 Updated by Adrien Crivelli about 6 years ago

I still experience this issue with Redmine 1.2.0.stable.6123. Anything I could help with to resolve this issue ?

#2 Updated by Adrien Crivelli about 6 years ago

In activities_controller.rb:46, the events are grouped by event_date. But in acts_as_event.rb:62, the event_date method does not take the user timezone in account:

        def event_date
          event_datetime.to_date
        end

Maybe these lines should be changed to always "shift" the date according to user's timezone ?

#3 Updated by Leos Prikryl almost 6 years ago

+1 for this. I still have this problem with 1.2.1.stable. The grouping on Activity page is quite confusing if you cooperate with a team from a distant time zone.

#4 Updated by Nickolay Mischenko over 5 years ago

Have same issue, it still not fixed.
1. I have server time set to UTC
2. Grouping is fine when user logged has time zone=utc too. Time labels are also fine.
3. When user time zone is my local GMT+11 grouping is still same as 2, but time labels are local
I can make patch for this, but I can't know what is right behavior: show utc times or group by local date? Resolution is - what team members see by sharing link to this pages?

#5 Updated by Leos Prikryl over 5 years ago

I would prefer grouping by local date. All times in issue tracker are local, so the grouping should use the local time zone as well.

#6 Updated by Achim Gaedke over 5 years ago

experiencing the same with redmine 2.0.2: the main activity list is correct, the one in the user tab doesn't do the day grouping correctly.

Environment:
Redmine version 2.0.2.stable.9774
Ruby version 1.8.7 (x86_64-linux)
Rails version 3.2.5
Environment production
Database adapter MySQL
Redmine plugins:
no plugin installed

#7 Updated by Phil Miller over 4 years ago

As of 2.2.2, this seems to be partially working now.

When I have a timezone preference set on my account, the project, user, and overall activity pages present times and group by dates according to that timezone. Without a timezone set in my account preferences, all three activity pages appear to group by UTC but display time of day in server-local time.

When testing any fix for this, beware of #8889, which leads to caching of stale data in the project activity view, but not the others.

I'm glad to provide any additional information on this, and fiddle with personal settings, but I can't install test versions on my system, since I'm trying to get real users on board as quickly as possible, and this is relatively minor to that end.

#8 Updated by Pierre-Francois Laquerre over 4 years ago

This is just a "me too" for 2.3-stable at r11784.

I have a commit with committed_on = 2013-05-02 23:22:52.232768 and commit_date = 2013-05-02 in the changesets table. When not logged in, the activity tab lumps it into 2013-05-03 instead of 2013-05-02, but still has the correct time 23:22. The revision details page shows the commit as being "16 hours ago", which is accurate. The repository tab also shows the right date and time. This glitch goes away if I log in as a user with GMT-5.

#9 Updated by Mischa The Evil over 4 years ago

  • Status changed from New to Needs feedback

So, the conclusion is that the issue is not present anymore in >= 2.2.x?

#10 Updated by Pierre-Francois Laquerre over 4 years ago

By "me too" I meant that it is still broken for me in 2.3-stable. Sorry for the confusion.

#11 Updated by Toshi MARUYAMA about 3 years ago

  • Related to Defect #14658: Wrong activity timezone on user page added

#12 Updated by Toshi MARUYAMA about 3 years ago

Activity page works correctly #14658#note-7.
But, user page is wrong #14658.

#13 Updated by Toshi MARUYAMA 9 months ago

  • Status changed from Needs feedback to Closed
  • Resolution set to Duplicate

I think this is fixed by #14658.
See #24707 description.

#14 Updated by Toshi MARUYAMA 9 months ago

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

Also available in: Atom PDF