posthog icon indicating copy to clipboard operation
posthog copied to clipboard

refactor: move timestamp util functions into class

Open EDsCODE opened this issue 2 years ago • 1 comments

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?

EDsCODE avatar Sep 20 '22 16:09 EDsCODE

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!

benjackwhite avatar Sep 21 '22 07:09 benjackwhite

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!

EDsCODE avatar Sep 22 '22 16:09 EDsCODE