infinitesunrise / carsinbikelanes

A browsable geographic database for crowdsourced traffic violation reporting
GNU General Public License v3.0
64 stars 18 forks source link

EXIF time extraction is wrong #48

Closed mattkime closed 7 years ago

mattkime commented 7 years ago

Attached an image captured at 5:30pm. the site is reporting that it was taken at 1:30pm

virb0002

rschmunk commented 7 years ago

Photoshop "file info" reports that the image has a timestamp of 17:30, with no timezone information.

Is the site expecting that the timestamp is UTC and subtracting 4 hours to get EDT?

infinitesunrise commented 7 years ago

Ugh I see, this is due to a discrepancy in the way that Chrome and Firefox interpret the js constructor for Date(). One browser offsets to local timezone and one interprets as UTC. I tested on FF assuming Chrome would be the same, of course they're not. I can get a fix in later tonight.

infinitesunrise commented 7 years ago

The fix is in! 9aff59880199756777aa4878fd49f1189f83f8a8 I basically abandoned the JS Date() class and now rely instead on string parsing.

Added both here and on carsinbikelanes,nyc, give it a whirl please.