diff --git a/assets/js/src/date.js b/assets/js/src/date.js
index b0acf29aa3..3bf52b7ed7 100644
--- a/assets/js/src/date.js
+++ b/assets/js/src/date.js
@@ -43,8 +43,9 @@ define('date',
options = options || {};
this.init(options);
- return Moment(date, this.convertFormat(options.parseFormat))
- .format(this.convertFormat(this.options.format));
+ var date = Moment(date, this.convertFormat(options.parseFormat));
+ if (options.offset === 0) date = date.utc();
+ return date.format(this.convertFormat(this.options.format));
},
toDate: function(date, options) {
options = options || {};
diff --git a/assets/js/src/newsletters/scheduling/common.jsx b/assets/js/src/newsletters/scheduling/common.jsx
index 9f5f06d9b6..1e0baedb4d 100644
--- a/assets/js/src/newsletters/scheduling/common.jsx
+++ b/assets/js/src/newsletters/scheduling/common.jsx
@@ -1,6 +1,8 @@
import _ from 'underscore'
import MailPoet from 'mailpoet'
+const timeFormat = window.mailpoet_time_format || 'H:i';
+
// welcome emails
const _timeDelayValues = {
'immediate': MailPoet.I18n.t('delayImmediately'),
@@ -28,7 +30,7 @@ const _timeOfDayValues = _.object(_.map(
}), function(seconds) {
let date = new Date(null);
date.setSeconds(seconds);
- const timeLabel = date.toISOString().substr(11, 5);
+ const timeLabel = MailPoet.Date.format(date, { format: timeFormat, offset: 0 });
return [seconds, timeLabel];
})
);
@@ -77,4 +79,4 @@ export { _intervalValues as intervalValues };
export { _timeOfDayValues as timeOfDayValues };
export { _weekDayValues as weekDayValues };
export { _monthDayValues as monthDayValues };
-export { _nthWeekDayValues as nthWeekDayValues };
\ No newline at end of file
+export { _nthWeekDayValues as nthWeekDayValues };
diff --git a/assets/js/src/newsletters/types/notification/scheduling.jsx b/assets/js/src/newsletters/types/notification/scheduling.jsx
index 617ec5b9a2..d0df6bb8d7 100644
--- a/assets/js/src/newsletters/types/notification/scheduling.jsx
+++ b/assets/js/src/newsletters/types/notification/scheduling.jsx
@@ -141,4 +141,4 @@ const NotificationScheduling = React.createClass({
}
});
-module.exports = NotificationScheduling;
\ No newline at end of file
+module.exports = NotificationScheduling;
diff --git a/views/layout.html b/views/layout.html
index 03639e9c89..074dcad97b 100644
--- a/views/layout.html
+++ b/views/layout.html
@@ -38,6 +38,11 @@ jQuery('.toplevel_page_mailpoet.menu-top-last')
<% block after_css %><% endblock %>
+
+
<%= javascript(
'vendor.js',
@@ -51,8 +56,6 @@ jQuery('.toplevel_page_mailpoet.menu-top-last')
)%>