mirror of
https://github.com/samsonjs/strftime.git
synced 2026-03-25 09:05:48 +00:00
fix sign of %z, indentation
This commit is contained in:
parent
2349fcd6d3
commit
70445ffc9a
1 changed files with 7 additions and 7 deletions
14
lib/index.js
14
lib/index.js
|
|
@ -112,13 +112,13 @@
|
|||
return tz && tz[1] || '';
|
||||
}
|
||||
case 'z':
|
||||
if (_useUTC) {
|
||||
return "+0000";
|
||||
}
|
||||
else {
|
||||
var off = d.getTimezoneOffset();
|
||||
return (off < 0 ? '-' : '+') + pad(off / 60) + pad(off % 60);
|
||||
}
|
||||
if (_useUTC) {
|
||||
return "+0000";
|
||||
}
|
||||
else {
|
||||
var off = d.getTimezoneOffset();
|
||||
return (off < 0 ? '+' : '-') + pad(off / 60) + pad(off % 60);
|
||||
}
|
||||
default: return c;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue