You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at parseDateTimeParts https://github.com/bwindels/exif-parser/blob/master/lib/date.js#L11,
the date generated sometimes depends on the date that the code is run...
For instance, imagine today is the 31 May 2017 at 23:50:00, and the string to parse is '2015:09:30 11:03:09.603280'
var date = new Date() yields 31 May 2017, 23:50:00.
date.setUTCFullYear(2015) yields 31 May 2015, 23:50:00
date.setUTCMonth(8) yields 30 October 2015, and not 31 September 2015 (because that date doesn't exist)
etc. The final date is 30 October 2015, 23:50:00 - A month off.
you should use var date = new Date(year, month, date, hours, minutes, seconds)
The text was updated successfully, but these errors were encountered:
maxf
pushed a commit
to maxf/exif-parser
that referenced
this issue
Jun 1, 2017
Looking at parseDateTimeParts https://github.com/bwindels/exif-parser/blob/master/lib/date.js#L11,
the date generated sometimes depends on the date that the code is run...
For instance, imagine today is the 31 May 2017 at 23:50:00, and the string to parse is
'2015:09:30 11:03:09.603280'
var date = new Date()
yields 31 May 2017, 23:50:00.date.setUTCFullYear(2015)
yields 31 May 2015, 23:50:00date.setUTCMonth(8)
yields 30 October 2015, and not 31 September 2015 (because that date doesn't exist)you should use
var date = new Date(year, month, date, hours, minutes, seconds)
The text was updated successfully, but these errors were encountered: