Project

General

Profile

Actions

Defect #23189

open

Spent time by filter, offset by one day

Added by Mentel Inc over 8 years ago. Updated over 3 years ago.

Status:
New
Priority:
High
Assignee:
-
Category:
Time tracking
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

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

Related to Redmine - Patch #22320: Respect user's timezone when comparing / parsing DatesClosedJean-Philippe Lang

Actions
Related to Redmine - Defect #16482: Wrong search query for timelog, when timezone not UTCNew

Actions
Related to Redmine - Defect #33941: Do not use timezone unaware methodsNew

Actions
Has duplicate Redmine - Defect #24547: Spent Time Date Filter Off by 1 DayClosed

Actions
Actions #1

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.

Actions #2

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

Actions #3

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?

Actions #4

Updated by Jean-Philippe Lang over 8 years ago

  • Related to Patch #22320: Respect user's timezone when comparing / parsing Dates added
Actions #5

Updated by Lucas Nogueira about 8 years ago

hello,

I am also this problem .. Anyone know any way to fix?

Thanks!

Actions #6

Updated by Go MAEDA almost 8 years ago

  • Has duplicate Defect #24547: Spent Time Date Filter Off by 1 Day added
Actions #7

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,

Actions #8

Updated by Toshi MARUYAMA over 7 years ago

  • Related to Defect #16482: Wrong search query for timelog, when timezone not UTC added
Actions #9

Updated by Andrey Krot over 7 years ago

+
The same issue in tasks filter.
Control reports work incorrect.

Actions #10

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

Actions #11

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.

Actions #12

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)

Actions #13

Updated by Go MAEDA almost 3 years ago

  • Related to Defect #33941: Do not use timezone unaware methods added
Actions

Also available in: Atom PDF