mholt / timeliner

All your digital life on a single timeline, stored locally -- DEPRECATED, SEE TIMELINIZE (link below)
https://timelinize.com
GNU Affero General Public License v3.0
3.57k stars 116 forks source link

Instagram import error: "extra text: +00:00" #59

Closed jacroe closed 3 years ago

jacroe commented 4 years ago

I'm receiving errors almost immediately after trying to import an Instagram export. Error:

2020/06/28 03:13:07 [ERROR][instagram/jacroe] Importing: importing: parsing photo time 2020-02-15T04:08:11+00:00 into format 2006-01-02T15:04:05: parsing time "2020-02-15T04:08:11+00:00": extra text: +00:00

The media.json file has data that looks like

{
  "photos": [
    {
      "caption": "A superb caption",
      "taken_at": "2020-02-15T04:08:11+00:00",
      "location": "Sanford, Florida",
      "path": "photos/202002/12345678901234567890abcdefabcdef.jpg"
    }
  ]
}

while the takenAtFormat within instagram.go is set to 2006-01-02T15:04:05.

Looks like Instagram is now providing explicit timezone information.

jacroe commented 4 years ago

Every single taken_at value in my media.json file had +00:00 tacked on at the end. Stripping that had Timeliner importing the export fine.

mholt commented 4 years ago

Ah, indeed, it looks like Instagram changed their time format. Should be easy enough to fix!