From fb817610e6b170c1544f02978f6fbf8641e1fc49 Mon Sep 17 00:00:00 2001 From: Collin Duncan <3679940+cgduncan7@users.noreply.github.com> Date: Fri, 10 Feb 2023 14:35:25 +0100 Subject: [PATCH] Adding log to custom dayjs wrapper --- src/common/dayjs.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/dayjs.ts b/src/common/dayjs.ts index 97e310a..d186582 100644 --- a/src/common/dayjs.ts +++ b/src/common/dayjs.ts @@ -3,6 +3,7 @@ import isSameOrBefore from 'dayjs/plugin/isSameOrBefore' import utc from 'dayjs/plugin/utc' import timezone from 'dayjs/plugin/timezone' import 'dayjs/locale/nl' +import { asyncLocalStorage } from './logger' dayjs.extend(isSameOrBefore) dayjs.extend(utc) @@ -14,6 +15,7 @@ dayjs.tz.setDefault('Europe/Amsterdam') const dayjsTz = ( date?: string | number | Date | dayjs.Dayjs | null | undefined ) => { + asyncLocalStorage.getStore()?.debug(` timezoning ${date}`) return dayjs(date).tz() }