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

Instagram dates do not include timezone offset #127

Closed
aaronpk opened this issue Jan 17, 2018 · 7 comments
Closed

Instagram dates do not include timezone offset #127

aaronpk opened this issue Jan 17, 2018 · 7 comments

Comments

@aaronpk
Copy link

aaronpk commented Jan 17, 2018

It looks like Granary is displaying dates from Instagram feeds as UTC, but then not including the timezone offset. (I'm using the Instagram to HTML conversion). It should either explicitly set the +0000 or Z offset if it's converting to UTC, or if it knows the local time then set that offset instead.

(XRay looks up the timezone for the photo's location and converts it to a local time, but you might not want to do that.)

@snarfed
Copy link
Owner

snarfed commented Jan 17, 2018

thanks for filing! funny, I'm working on another timezone bug right now, #126, so I'll tackle this one too.

@snarfed
Copy link
Owner

snarfed commented Jan 17, 2018

hey again. is this in atom? published and updated there should always have the Z suffix. or somewhere else?

XRay looks up the timezone for the photo's location and converts it to a local time

you mean literally, like with a GIS service and timezone database, right? so far i haven't found any other time zone or location info in IG's embedded JSON in media or user pages. and that only works for photos with locations, right?

@snarfed
Copy link
Owner

snarfed commented Jan 17, 2018

(if this is atom, i doubt the fix for #126 fixed it too, but it's very slightly possible.)

@aaronpk
Copy link
Author

aaronpk commented Jan 17, 2018

I haven't checked the Atom feed, I was using the HTML one. And yeah XRay has a really simple timezone lookup service built in which uses the location of the photo to find the local timezone

@snarfed
Copy link
Owner

snarfed commented Jan 17, 2018

thanks! then yeah, this is actually expected. if i don't know the time zone, i leave timestamps naive, ie time zone unaware, so they don't include an offset or Z.

i'm happy to leave this open as a feature request to look up and add time zones by location when available, if you want. let me know if you have anything else in mind.

@aaronpk
Copy link
Author

aaronpk commented Jan 17, 2018

The dates that Granary is returning are always in UTC though, so Granary should add the Z. Since Instagram provides unix timestamps in the JSON, that's always an exact point in time, not a floating time.

@snarfed
Copy link
Owner

snarfed commented Jan 17, 2018

discussed in IRC, checked and confirmed that instagram's unix timestamps are UTC. fixed! thanks again for reporting.

@snarfed snarfed closed this as completed Jan 17, 2018
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