Skip to content

DatePicker defaults to local TZ #654

@minodudd

Description

@minodudd

In the billing tab on sysadmin (see OrgTabBillingTable), we use this picker to feed a call to the API that relies on UTC dates.
When I run this in my browser on CEST TZ (Europe/Madrid), and pick Aug 2nd, the console shows the picked value:

{start: Sat Aug 02 2025 00:00:00 GMT+0200 (Central European Summer Time)}

When the code later takes this value and naively pulls the date as ISO date, it ends up getting the previous day because when my TZ hits midnight, the UTC time was still the day before.

I can adjust my code to handle this, but it would be great to have a parameter on the component to toggle between UTC and local time.

Ideally this would apply to the DateRangePicker as well (I'm currently using two DatePicker components until the range is available)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions