Fix chart timezone bug #2224
Reference in New Issue
Block a user
Delete Branch "zachgoll/fix-chart-timezone-bug"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The
Periodvalue object (used for many charts) was instantiating pre-defined date ranges into a config hash and reading them at request time.Since our timezones are dynamically set around each request and these values were already instantiated, the
Date.currentused in many of them was evaluating based on UTC time instead of the user's configured timezone.This PR configures these pre-defined values as procs so they are evaluated dynamically within the context of the user's timezone.