From 5eb3022327f7a02537dbdb8bb670f23272c50d22 Mon Sep 17 00:00:00 2001 From: cindy-peng Date: Mon, 6 Nov 2023 13:02:58 -0800 Subject: [PATCH] fix: Fix timestamp drift due to prototype comparison --- src/common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common.ts b/src/common.ts index f2bd7716..50e5dcfa 100644 --- a/src/common.ts +++ b/src/common.ts @@ -253,7 +253,7 @@ export class LoggingCommon { // metadata. As Winston 3 buffers logs when a transport (such as this one) // invokes its log callback asynchronously, a timestamp assigned at log time // is more accurate than one assigned in a transport. - if (metadata.timestamp instanceof Date) { + if (metadata.timestamp) { entryMetadata.timestamp = metadata.timestamp; }