gomfunkel / node-exif

A node.js library to extract Exif metadata from images.
MIT License
581 stars 104 forks source link

ModifyDate, DateTimeOriginal, CreateDate formats with : instead of - #37

Closed linus-amg closed 9 years ago

linus-amg commented 9 years ago

hi,

my exif data is containing these key/values

ModifyDate: '2015:04:14 09:12:53' DateTimeOriginal: '2015:04:14 09:12:53' CreateDate: '2015:04:14 09:12:53'

where i think that the date-values should be seperated by - instead of : or am i missing something?

jeffklassen commented 9 years ago

Disclaimer: I'm not the package maintainer.

Would you please give some more reasoning in your bug request? It seems that if you want to change the delimiter, you could simply:

var dateTimeString = '2015:04:14 09:12:53';
var timeString = dateTimeString.substring(dateTimeString.indexOf(' '));
var dateString = dateTimeString.substring(0,dateTimeString.indexOf(' '));
dateString = dateString.replace(/\:/g, '-');

dateTimeString = dateString+" " + timeString;
linus-amg commented 9 years ago

sorry, i did not know that the default format for exif timestamp was with : as date-fragment-delimiter.