Defect #23189
openSpent time by filter, offset by one day
0%
Description
We just upgrade to 3.3.0.stable.
If you log time today (June28) and then go in spent time, filter by today, the logged time isn't showing up. If you do yesterday, it shows up with the today's date (June28).
Same issue in the project time logs.
However, if you select All, it works.
I tried to see if someone else had reported it, I couldn't find it, if it's the case I'm sorry in advance.
Files
Related issues
Updated by Manuel Reinhardt over 8 years ago
Same problem here, also on 3.3.0.stable. Workaround: I get correct results if I set the time zone in my account to the one used on the server.
Updated by Mentel Inc over 8 years ago
Manuel Reinhardt wrote:
Same problem here, also on 3.3.0.stable. Workaround: I get correct results if I set the time zone in my account to the one used on the server.
I confirm, this turn around works perfectly.
Thanks Manu
Updated by Jean-Philippe Lang over 8 years ago
This is related to #22320. Date filters now take care of timezones.
Workaround: I get correct results if I set the time zone in my account to the one used on the server.
Did you get incorrect results when leaving your timezone blank in your Redmine account?
Updated by Jean-Philippe Lang over 8 years ago
- Related to Patch #22320: Respect user's timezone when comparing / parsing Dates added
Updated by Lucas Nogueira about 8 years ago
hello,
I am also this problem .. Anyone know any way to fix?
Thanks!
Updated by Go MAEDA almost 8 years ago
- Has duplicate Defect #24547: Spent Time Date Filter Off by 1 Day added
Updated by Jamila Khan over 7 years ago
I put my documentation in #16482-7, we are having this issue as well.
Is there more documentation that is needed that would help figure out the cause?
thanks,
Updated by Toshi MARUYAMA over 7 years ago
- Related to Defect #16482: Wrong search query for timelog, when timezone not UTC added
Updated by Andrey Krot over 7 years ago
- File 2017-04-17_10h00_03.jpg 2017-04-17_10h00_03.jpg added
+
The same issue in tasks filter.
Control reports work incorrect.
Updated by Phlip Plumlee over 6 years ago
We have this bug, with version 3.4.2.stable.
On our server, with the UTC timezone, the Query system generates SQL that seems to compare a date by time adjusted by the timezone in my preferences (PST): time_entries.spent_on >= '2018-01-09 07:59:59.999999' AND time_entries.spent_on <= '2018-01-10 07:59:59.999999'
. I'm trying for January 9th, there, and MySQL presumably converts a date of '2018-01-09' to a datetime of "midnight".
On my notebook, set to PST, the query is correct: time_entries.spent_on > '2018-01-14 23:59:59.999999' AND time_entries.spent_on <= '2018-01-15 23:59:59.999999'
. I get the records I'm looking for, on '2018-01-15'.
When I erase my timezone from my Preferences on the server, the problem goes away.
I could fix this myself, as soon as I figure out where in the Query system that line gets generated...
Updated by Steve Karrmann over 6 years ago
We encountered this issue as well. Date filters were returning results off by one day, but only for users with a time zone specified in their account settings.
Our solution was to disable the time zone handling in class app/models/query.rb
function date_for_user_time_zone
- see attached patch.
With this change, all date filters return the correct dates, even for users with a time zone specified.
Updated by Kevin Porras over 3 years ago
Hi,
I'm having the same issue. The provided patch will make it work but, is this the right way to go? Is there a way we could help to make this fix permanent into Redmine? (I'm sorry, I'm new to this issue queue)
Updated by Go MAEDA almost 3 years ago
- Related to Defect #33941: Do not use timezone unaware methods added