Skip to content

Commit 263a8f1

Browse files
committed
fix(date-range): timezone drift
1 parent b1ee698 commit 263a8f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/notebooks/deepnote/converters/inputConverters.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ function normalizeDateString(dateValue: unknown): string {
3333
if (isNaN(date.getTime())) {
3434
return dateValue;
3535
}
36-
const year = date.getFullYear();
37-
const month = String(date.getMonth() + 1).padStart(2, '0');
38-
const day = String(date.getDate()).padStart(2, '0');
36+
const year = date.getUTCFullYear();
37+
const month = String(date.getUTCMonth() + 1).padStart(2, '0');
38+
const day = String(date.getUTCDate()).padStart(2, '0');
3939
return `${year}-${month}-${day}`;
4040
} catch {
4141
return dateValue;

0 commit comments

Comments
 (0)