5 replies [Last post]
BenStallings's picture
Offline
Joined: 03/13/2008
Juice: 91
Was this information Helpful?

This is more of an annoyance than a serious bug, but I think it is a bug...

Using Ubercart version 5.x-1.4, when I go to /admin/store/reports/sales and click Yesterday, the date range I get is not from midnight yesterday to 23:59:59 yesterday, but instead from 8 PM two days ago to 19:59:59 yesterday. If I open the Search Options pane and manually select yesterday for both start and end dates, the correct date range is used.

Why 8 PM? It's nowhere near that time now. Weird! And annoying to my boss. Suggestions welcome.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Yesterday's sales report date range off by 4 hours

Not sure... have you set your site's timezone properly?

BenStallings's picture
Offline
Joined: 03/13/2008
Juice: 91
timezone does not appear to be the problem

Yes, as I mentioned, if I set the start & end date manually, the resulting timestamps are correct, and if I view Today they are correct; it's only when I click Yesterday that they are incorrect.

Is this not the case in the Livetest? I don't have an admin login for that.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: timezone does not appear to be the problem

Hmm... I'm not sure. One problem is I just don't have enough orders on the Livetest to test. However, here are the timestamps I'm getting... perhaps you can compare them to the timestamps in your URLs?

Today - 1222833600/1222919999
Yesterday - 1222747200/1222833599

Both show a difference of 86,399 seconds, which is one day's worth of seconds.

BenStallings's picture
Offline
Joined: 03/13/2008
Juice: 91
not exactly the problem

Whoops -- your first suggestion was correct, Drupal's time zone was set incorrectly! I mistakenly thought it was not because when I set the dates manually, I got the right reports. Thanks for hanging in there, Ryan! Sorry to take your time!

cYu
cYu's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 11/19/2007
Juice: 850
Re: not exactly the problem

I've recently run across the same thing. My problem came though, due to daylight savings time not being supported in Drupal...so the time zone that was originally picked for the site was correct but at the moment it is not.

Is the solution for this to switch the time zone along with DST switches? Seems like that has the potential to mess other things up, but without doing that I don't see a way to keep reports accurate.