diff --git a/source/Ox/js/Format.js b/source/Ox/js/Format.js index 595eb2ab..12eed55e 100644 --- a/source/Ox/js/Format.js +++ b/source/Ox/js/Format.js @@ -159,7 +159,10 @@ Ox.formatDate = function(date, str, utc) { ['p', function(d) {return Ox.AMPM[Math.floor(Ox.getHours(d, utc) / 12)];}], ['Q', function(d) {return Math.floor(Ox.getMonth(d, utc) / 4) + 1;}], ['S', function(d) {return Ox.pad(Ox.getSeconds(d, utc), 2);}], - ['s', function(d) {return Math.floor(d.getTime() / 1000);}], + ['s', function(d) { + return Math.floor(d.getTime() / 1000) + - (utc ? Ox.getTimezoneOffset() / 1000 : 0); + }], ['U', function(d) {return Ox.pad(Ox.getWeek(d, utc), 2);}], ['u', function(d) {return Ox.getISODay(d, utc);}], ['V', function(d) {return Ox.pad(Ox.getISOWeek(d, utc), 2);}],