Showing date in activity page is wrong
I opened Activity page on Sun May 2 19:24:33 ICT 2010 (date&time on server).
it shows below or see on screenshot:
From 04/02/2010 to 05/01/2010
So Today is not 05/01/2010. Is it a bug.
For more information, please let me know.
#2 Updated by Felix Schäfer about 9 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 about 9 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 about 9 years ago
I tried to print value from 2 variables(date, Date.today) in app/views/projects/activity.rhtml
date = 2010-05-26
Date.today = 2010-05-26
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.
#6 Updated by Anton Gavrilov over 8 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.
#12 Updated by Daniel Felix over 6 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.