From 7570b0dee4a43ac5fa5a5c2cff15ece81bec23f8 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 26 Aug 2023 12:56:07 -0500 Subject: [PATCH] utils: new Date().getTime() --> Date.now() --- src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index 653c824..44dff18 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -3,7 +3,7 @@ import { lookupNip05Cached } from '@/nip05.ts'; import { getAuthor } from '@/queries.ts'; /** Get the current time in Nostr format. */ -const nostrNow = () => Math.floor(new Date().getTime() / 1000); +const nostrNow = () => Math.floor(Date.now() / 1000); /** Convenience function to convert Nostr dates into native Date objects. */ const nostrDate = (seconds: number) => new Date(seconds * 1000);