diff --git a/src/html/assets/themes/fabrizio1.0/javascripts/gallery.js b/src/html/assets/themes/fabrizio1.0/javascripts/gallery.js index 403dbbd32..f7f62b922 100644 --- a/src/html/assets/themes/fabrizio1.0/javascripts/gallery.js +++ b/src/html/assets/themes/fabrizio1.0/javascripts/gallery.js @@ -181,8 +181,6 @@ var Gallery = (function($) { var pinnedClass = !batchEmpty && OP.Batch.exists(item.id) ? 'pinned' : ''; var imageContainer = $('
'); - var d = new Date(item.dateTaken*1000); - var pathKey = 'path' + configuration['thumbnailSize']; var defaultWidthValue = configuration['defaultWidthValue']; var defaultHeightValue = configuration['defaultHeightValue']; @@ -220,9 +218,10 @@ var Gallery = (function($) { imageContainer.append(overflow); // insert calendar icon - currentDate = d.getYear()+'-'+d.getMonth()+'-'+d.getDay(); + var d = new Date(item.dateTakenYear, item.dateTakenMonth - 1, item.dateTakenDay); + currentDate = item.dateTakenYear + '-' + item.dateTakenMonth + '-' + item.dateTakenDay; if(currentDate !== lastDate) - imageContainer.prepend(dateSeparator(item.dateTaken)); + imageContainer.prepend(dateSeparator(d)); lastDate = currentDate; /**