New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date for Order Revenue Chart In Admin is off by 1 #518
Comments
I can confirm this is an issue, maybe not offset by 1, but it'd likely match the timezone. See the attached screenshot that shows a few orders. The current date/time in Australia AEST is 28/11 8:00AM, and I'm highlighting the 28/11 tick which reports $0. You can clearly see we've captured orders for that date, early in the morning. Of course, as dates are captured in UTC, the database records them as |
@benjamindavid Hate to be annoying and bump this - but I'm going to 😄 |
@lukeholder Still looking for a resolution to this. Is no one else seeing this sort of issue? |
I have the same issue. I've looked at Craft 2 version, here is the code for the dates range $startDate = DateTime::createFromString($startDateParam, craft()->timezone);
$endDate = DateTime::createFromString($endDateParam, craft()->timezone); And here is the code for Craft 3 version $startDate = DateTimeHelper::toDateTime($startDateParam);
$endDate = DateTimeHelper::toDateTime($endDateParam); Definition of the public static function toDateTime($value, bool $assumeSystemTimeZone = false, bool $setToSystemTimeZone = true) I'm pretty sure that the problem is that system timezone is ignored due to |
Our clients are seeing this same issue. Looks like it is not off by exactly 1 day, but more like 20 hours in our case (time zone = UTC-4). Tough to explain to clients that they cannot rely on the data from the admin area of the website. |
Our clients have mentioned the same issue. Per @mklishevych above, can we pass the time zone to resolve this? E.g. something like:
Or are there other reasons why this is in place? It would be great to get a resolution or update on this issue. |
We're seeing the same issue on our production sites also. Clients seem to use this quite a bit. |
@bossanova808 Possibly related to #792? |
So Josh fixed my currency issue by telling me to add to config general.php:
Then, English (Australia) becomes an option in the preferences for Craft Users. Save this for your account, and like magic those pounds are gone... Ta Josh! |
@bossanova808 That'll teach you for hijacking the thread 😘 |
@lukeholder any update on this issue? Is it more complicated than simply passing the time zone as the second parameter? Thank you. |
Will look at it first thing tomorrow. Thanks. |
Thanks everyone for your patience. The date range issue has been fixed on the develop branch, will be in the next release. Working on the #792 next. |
Description
Pretty sure this stems from the difference of UTC vs whatever is defined in the commerce settings. For instance, if you set the dates to be 9/27 - 10/4 the graph actually shows 9/26 - 10/3. Would expect that chart data's date to match with the timezone in the settings.
Steps to reproduce
Additional info
The text was updated successfully, but these errors were encountered: