Skip to content

Widget timezone reporting #32

@moacode

Description

@moacode

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions