Defect #5425

Showing date in activity page is wrong

Added by minkbear minkbear over 7 years ago. Updated 9 months ago.

Status:ClosedStart date:2010-05-02
Priority:NormalDue date:
Assignee:-% Done:

0%

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

Description

I opened Activity page on Sun May 2 19:24:33 ICT 2010 (date&time on server).
it shows below or see on screenshot:

Active
From 04/02/2010 to 05/01/2010

Today
......

04/30/2010
......

===================================================
So Today is not 05/01/2010. Is it a bug.
For more information, please let me know.

Activity_Bug.png (33.1 KB) minkbear minkbear, 2010-05-02 21:21

Google_ChromeScreenSnapz003.jpg - Activity page (14.3 KB) Avery Chan, 2010-05-24 15:00

Google_ChromeScreenSnapz005.jpg - Issues page (24.3 KB) Avery Chan, 2010-05-24 15:00


Related issues

Related to Redmine - Defect #8889: Activity page not refreshed correctly on updates which ar... New 2011-07-23
Related to Redmine - Defect #1048: Day grouping on Activity view ignores user's time zone Closed 2008-04-12
Duplicates Redmine - Defect #24707: Activity in User Profile shows incorrect date/time, depen... Closed

History

#1 Updated by minkbear minkbear over 7 years ago

forgot to fill Affected version: 0.9.3

#2 Updated by Felix Schäfer over 7 years ago

The time rendered in the html views is not the time on the server but the time according to the timezone rails detects from your browser or the timezone you set in your user preferences. As to why there is such a discrepancy, I can't tell you exactly. Could you give us access to your redmine (the html part) so that we can have a look?

#3 Updated by Avery Chan over 7 years ago

I'm seeing this problem too. I could give you access to the redmine part if I understood better what you need in order to get access to that part. I'm uploading two files to better illustrate the problem. You can see that the screenshot from the activity page shows the date and time as being 5/23/2010. The screenshot from the issue page shows the time as being 5/24/2010 2:40 pm. This was via a mouse-over of the "about 6 hours" link. You can see that this is the same issue; the copied text shows this.

I'm not sure if this is exactly the problem being described here, but it is certainly a defect in the Activity page. This is running Redmine 0.9.4.stable.3733 (MySQL).

#4 Updated by minkbear minkbear over 7 years ago

I tried to print value from 2 variables(date, Date.today) in app/views/projects/activity.rhtml
Result:
date = 2010-05-26
Date.today = 2010-05-26

More information:
Server date: Thu May 27 07:02:24 ICT 2010
My Time zone Preferences: GMT+7

1. Why is the value in Date.today = 2010-05-26? It should be 2010-05-27.
2. It always be wrong date in activity page around 0700 AM.

#5 Updated by Andrew Brock about 7 years ago

I've noticed this too but it only happens on the global activity page, not on the group activity pages. "Today" is always set to be the day of the last Redmine activity item.

#6 Updated by Anton Gavrilov almost 7 years ago

  • Status changed from New to Resolved

Got this problem too. Every morning I get yesterday version of Activity page until any issue is updated. Moreover, when I switched my account's language, every page (or at least Issues, New issue and Gantt) got new language with the only exception - Activity.

It appears the troublemaker is line 26 in app\controllers\activities_controller.rb (Redmine ver. 1.0.3):

if events.empty? || stale?(:etag => [events.first, User.current])

My Ruby experience is negligible, but as far as I get it, it blocks rendering new page and instead feeds old version from cache if there is no new events since last rendering. So you'll keep getting the same version of the page with obsolete dates until someone edit any issue. I commented line 26 and 42 (trailing end) and it seems it works.

#7 Updated by Felix Schäfer almost 7 years ago

  • Status changed from Resolved to New

Resolved is limited to commited-to-trunk-but-not-to-stable-yet issues, thank you.

#8 Updated by Anton Gavrilov almost 7 years ago

How do I commit to trunk? Or commitment is reserved for developers and I should attach patch instead?

#9 Updated by Felix Schäfer almost 7 years ago

Anton Gavrilov wrote:

Or commitment is reserved for developers and I should attach patch instead?

Yes.

#10 Updated by Daniel Felix almost 5 years ago

  • Status changed from New to Needs feedback

Any news on this? I'm not able to reproduce this in the Redmine 2.2.1.

#11 Updated by Phil Miller over 4 years ago

I'm still seeing something of this sort in 2.2.2 - the Activity pages don't update to reflect settings changes, in my case timezone, unless something else forces the page to be regenerated. I experienced this while looking at #1048.

#12 Updated by Daniel Felix over 4 years ago

Phil Miller wrote:

I'm still seeing something of this sort in 2.2.2 - the Activity pages don't update to reflect settings changes, in my case timezone, unless something else forces the page to be regenerated. I experienced this while looking at #1048.

Yes, this seem to relate to #1048. The timezones won't be respected in every redmine module. This is also a big goal for future redmine versions.

#13 Updated by Ewan Makepeace 10 months ago

+1

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

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