Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/display/annotation_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1671,6 +1671,14 @@ class TextWidgetAnnotationElement extends WidgetAnnotationElement {
).valueOf();
target.step = "";
} else {
// Unfortunately, when the date is "2025-09-23", the parser
// converts it to UTC time which may lead to the date being off by
// one day depending on the timezone. To workaround this, we
// append "T00:00" to the date so that it's parsed as local
// time (bug 1989874).
if (!value.includes("T")) {
value = `${value}T00:00`;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to add a test case for this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it wasn't possible to set a different timezone for a specific test but it's possible:
https://pptr.dev/api/puppeteer.page.emulatetimezone

}
value = new Date(value).valueOf();
}
target.type = "text";
Expand Down