apostrophe-blog
Advanced tools
Comparing version 0.0.43 to 0.0.44
13
index.js
@@ -149,2 +149,15 @@ var async = require('async'); | ||
// Denormalize the publication date and time | ||
var superBeforeSave = self.beforeSave; | ||
self.beforeSave = function(req, data, snippet, callback) { | ||
if (snippet.publicationTime === null) { | ||
// Make sure we specify midnight, if we leave off the time entirely we get | ||
// midnight UTC, not midnight local time | ||
snippet.publishedAt = new Date(snippet.publicationDate + ' 00:00:00'); | ||
} else { | ||
snippet.publishedAt = new Date(snippet.publicationDate + ' ' + snippet.publicationTime); | ||
} | ||
return superBeforeSave(req, data, snippet, callback); | ||
}; | ||
// TODO this is not very i18n friendly | ||
@@ -151,0 +164,0 @@ self.getAutocompleteTitle = function(snippet) { |
{ | ||
"name": "apostrophe-blog", | ||
"version": "0.0.43", | ||
"version": "0.0.44", | ||
"description": "Blogging for the Apostrophe content management system", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
23943
290