プロジェクト

全般

プロフィール

Vote #74245

完了

Wrong activity timezone on user page

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Activity view_50
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
50
version_id:
124
issue_org_id:
14658
author_id:
11192
assigned_to_id:
1
comments:
16
status_id:
5
tracker_id:
1
plus1:
1
affected_version:
closed_on:
affected_version_id:
72
ステータス-->[Closed]

説明

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.

!user-activity.png!


journals

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
--------------------------------------------------------------------------------

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

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
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
--------------------------------------------------------------------------------
Activity page works correctly.
http://www.redmine.org/activity?from=2013-08-10&user_id=11192

!act.png!
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
This issue can be fixed by the following patch.
ActivitiesController#show have been fixed in r9726 ("diff":http://www.redmine.org/projects/redmine/repository/revisions/9726/diff/trunk/app/controllers/activities_controller.rb) in order to handle time zones properly. This patch applies the same fix to UsersController#show.

<pre><code class="diff">
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
</code></pre>
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Fix committed, thanks.
--------------------------------------------------------------------------------
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.

--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,1048,Day grouping on Activity view ignores user's time zone
relates,Closed,10996,Time zones lost when upgrading from Redmine 1.4 to 2.0
duplicates,Closed,24707,Activity in User Profile shows incorrect date/time, dependent to Time zone

Admin Redmine さんが3年以上前に更新

  • カテゴリActivity view_50 にセット
  • 対象バージョン3.2.5_124 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0