fix formatting dates as UTC seconds

This commit is contained in:
rolux 2012-02-24 22:13:23 +05:30
parent 98272ee54a
commit 439a0a58af

View file

@ -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);}],