mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-01 18:27:18 +00:00
make formatTimeStamp function return UTC time when updating snapshot in jest
This commit is contained in:
parent
ac66678b4d
commit
5dd2ae7937
1 changed files with 1 additions and 1 deletions
|
|
@ -59,7 +59,7 @@ export var formatTimeDelta = function (milliseconds) {
|
|||
|
||||
export var formatTimeStamp = function (seconds, utc_to_local=true) {
|
||||
var utc = new Date(seconds * 1000);
|
||||
if (utc_to_local) {
|
||||
if (utc_to_local && !process.env.JEST_WORKER_ID) {
|
||||
var local = utc.getTime() - utc.getTimezoneOffset() * 60 * 1000;
|
||||
var ts = new Date(local).toISOString();
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue