Commit ea9ecc0
committed
fix: use local timezone for date grouping instead of UTC
The date formatters were using UTC timezone which caused usage data to be
grouped incorrectly. For example, usage at 20:00 local time would appear
on the next day if the local timezone was behind UTC.
This regression was introduced in PR #409 (commit f7c5251) which added
explicit UTC timezone to the Intl.DateTimeFormat configuration.
The fix removes the hardcoded 'timeZone: UTC' option, allowing the
formatters to respect the system's local timezone or the TZ environment
variable if set.
Changes:
- Remove 'timeZone: UTC' from dateFormatter
- Remove 'timeZone: UTC' from datePartsFormatter
- Update comment to reflect local timezone usage
This ensures usage data is grouped by the user's local date boundaries
rather than UTC date boundaries.1 parent 3165855 commit ea9ecc0
1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
520 | | - | |
| 520 | + | |
521 | 521 | | |
522 | 522 | | |
523 | | - | |
524 | 523 | | |
525 | 524 | | |
526 | 525 | | |
| |||
541 | 540 | | |
542 | 541 | | |
543 | 542 | | |
544 | | - | |
545 | 543 | | |
546 | 544 | | |
547 | 545 | | |
| |||
0 commit comments