From 0c2f59f2739b5087a669e380f27ac783a06677fe Mon Sep 17 00:00:00 2001 From: Theodore Kruczek Date: Sun, 14 Jan 2024 19:53:44 -0500 Subject: [PATCH] test: :white_check_mark: fix time difference in snapshot --- src/body/Sun.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/body/Sun.ts b/src/body/Sun.ts index cf6d77d..5be121b 100644 --- a/src/body/Sun.ts +++ b/src/body/Sun.ts @@ -240,7 +240,7 @@ export class Sun { if (isDegrees) { az = (az * DEG2RAD); } - const date = new Date(dateValue); + const date = dateValue instanceof Date ? dateValue : new Date(dateValue); const lw = (DEG2RAD * -lon); const phi = (DEG2RAD * lat);