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

Timestamps appear off for Orders #8

Closed
lduh opened this issue Aug 18, 2016 · 4 comments
Closed

Timestamps appear off for Orders #8

lduh opened this issue Aug 18, 2016 · 4 comments

Comments

@lduh
Copy link
Contributor

lduh commented Aug 18, 2016

https://cl.ly/3D11432l0j35

url: https://us1.admin.mailchimp.com/lists/members/view?id=435033261&use_segment=Y

shard: us1
os: Mozilla/5.0 Macintosh; Intel Mac OS X 10_11_4
browser: Chrome/52.0.2743.116
uid: 44490434
lid: 435033261

Order is place at 5:09 and confirmation is received at 5:09, store and customer are both in Eastern standard time. Order is shown as 9:09 pm.

@khungate-zz
Copy link

@lduh i can't reproduce on my end, all good here with my enviro - @ryanhungate could it be the server times throwing this off where the plugin lives?

also @lduh, just to clarify, both your wordpress and MC times are eastern? you can see the wp time under settings > general: https://www.dropbox.com/s/6gvwu6z4hm7cg8e/Screenshot%202016-08-23%2011.51.23.png?dl=0

@lduh
Copy link
Contributor Author

lduh commented Sep 6, 2016

Store and MC account are both EST.

@ryanhungate
Copy link
Collaborator

@lduh @khungate I always hate working with dates... this is what i'm doing... I'm taking the date from the actual order itself, and running it through this function. I'll need to play with things a little more to find out why it's not working as expected for 1, but not the other... and yes, it's most likely something to do with the system settings i'm sure.

function mailchimp_date_utc($date) {
    $timezone = mailchimp_get_option('store_timezone', 'America/New_York');
    $date = new \DateTime($date, new DateTimeZone($timezone));
    $date->setTimezone(new DateTimeZone('UTC'));
    return $date;
}

@lduh lduh added the Done label Sep 15, 2016
@lduh
Copy link
Contributor Author

lduh commented Sep 15, 2016

Looks good!

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

No branches or pull requests

3 participants