utils: new Date().getTime() --> Date.now()

This commit is contained in:
Alex Gleason 2023-08-26 12:56:07 -05:00
parent e17111a859
commit 7570b0dee4
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 1 additions and 1 deletions

View File

@ -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);