Skip to content

Commit a37c8cf

Browse files
committed
chore: coderabbits CR feedback
1 parent 263a8f1 commit a37c8cf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/notebooks/deepnote/converters/inputConverters.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ function normalizeDateString(dateValue: unknown): string {
2828
return dateValue;
2929
}
3030

31+
// Detect ISO-style strings that start with YYYY-MM-DD (e.g., "2025-09-30T00:00:00+02:00")
32+
// and extract just the date portion to avoid timezone shifts
33+
if (/^\d{4}-\d{2}-\d{2}/.test(dateValue)) {
34+
return dateValue.substring(0, 10);
35+
}
36+
3137
try {
3238
const date = new Date(dateValue);
3339
if (isNaN(date.getTime())) {

0 commit comments

Comments
 (0)