Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If user has to input date/time manually, use MUI Date and Time Pickers. As a rule of thumb, including only a date picker should save date only, and including both should save timestamp.

Remember to document and indicate on the front-end whether a time picker is for EST ET or UTC (and make sure you convert when sending to backend if necessary)! By default it is a good idea to keep things in ET (America/New_York). Refer to the MUI documentation to set timezones.

When displaying a timestamp that includes a time, include the time in ET and append “ET” or “Eastern” after it. Don’t think there are examples of this currently, but if added you should make a new pipe for it.

...

For future schema additions, explicitly tag timestamps with @db.Timestamp(3) and dates with @db.Date. (TODO: Do we need timestamps to contain timezone info? i. e. is 5 pm ET different from 4 pm CT? Probably not.)

For old data that is @db.Timestamp but should be a plain date, store it as yyyy-mm-ddT00:00:00Z (midnight UTC). Use the transformer mentioned above.

...