Skip to content
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

Widget timezone reporting #32

Open
moacode opened this issue Oct 14, 2019 · 1 comment
Open

Widget timezone reporting #32

moacode opened this issue Oct 14, 2019 · 1 comment

Comments

@moacode
Copy link

moacode commented Oct 14, 2019

Hi there, would it be possible to take into account Craft's timezone setting when fetching data for the various widgets?

I recently took the plunge and built a custom widget that reported on different order types (specific to a particular CC site). I found that all dates are stored in UTC time, so to get the correct output for my timezone (Pacific/Auckland), I needed to do something similar to a fix implemented in CC earlier in the year: craftcms/commerce@b36ad11.

Just for reference, this is what I'm currently seeing with the goal widget vs. Craft Commerce:

Screen Shot 2019-10-15 at 9 05 34 AM

Screen Shot 2019-10-15 at 9 05 26 AM

... and this is from my custom widget:

Screen Shot 2019-10-15 at 9 05 41 AM

If I get time I might have a crack and raise a PR, but can't promise anything!

@bymayo
Copy link
Owner

bymayo commented Oct 15, 2019

Definitely! I do have timezones on the roadmap for this, but it wasn't a priority, but I can bump it up.

If you fancy doing a PR though, go ahead, as it will be a few weeks until I can look at adding this in. If you do a PR I'll chuck you a free license 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants