posthog
posthog copied to clipboard
refactor: move timestamp util functions into class
Problem
- timestamp handling is a mess
- make a class that handles the parameter determination
- no functionality is changed. All the current tests should pass
Changes
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
How did you test this code?
May be worth having a look a this issue if you are working on anything related to dates. I tried to deep dive into why weird things happen with timezones. Couldn't find a solution but perhaps you will have better luck!
Will address https://github.com/PostHog/posthog/issues/11492 and TIME_IN_SECONDS issues separately. This PR is meant to just refactor without changing functionality!