• Pyro@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      11 months ago

      I think what they meant is requiring that only UTC time should be in the database. This prevents ambiguity when pulling dates/times out as with many poorly designed systems it’s not possible to know whether a date represents UTC time or local time.

      At my work we store local time in our database and I hate it. We only serve customers in our country, which only has one time zone, so that’s fine for now. But we’ve definitely made it harder for ourselves to expand if we ever wanted to.

      • AA5B@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        11 months ago

        Better yet, why are you not using a Date type? That’s very precisely defined, more scalable, and plenty of functionality for doing math or converting among time zones. You don’t have to care what time zone you’re in, and can give people the answer in any time zone