Now getTimezone returns UTC by default if x-client-timezone header not presented .
This commit is contained in:
parent
e440ffaf13
commit
8f27417169
3
util.js
3
util.js
@ -33,7 +33,10 @@ exports.getServiceByHost = (host, service="") => {
|
|||||||
exports.getTimezone = ctx => {
|
exports.getTimezone = ctx => {
|
||||||
if (ctx.header['x-client-timezone'] !== undefined)
|
if (ctx.header['x-client-timezone'] !== undefined)
|
||||||
return ctx.header['x-client-timezone'];
|
return ctx.header['x-client-timezone'];
|
||||||
|
else
|
||||||
|
return "UTC";
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.formats = formats;
|
exports.formats = formats;
|
||||||
exports.datetime = datetime;
|
exports.datetime = datetime;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user