• ryannathans
    link
    fedilink
    English
    arrow-up
    24
    arrow-down
    2
    ·
    7 months ago

    Write everything in UTC, cast to local time zone for UIs

    Life problems solved

    • ulterno@lemmy.kde.social
      link
      fedilink
      English
      arrow-up
      3
      ·
      7 months ago

      That’s essentially what I did in my recent UI that I made for someone.

      • You want to insert date time
      • Select method: UTC, Time Zone, offset from GMT
      • Enter time
      • I convert it to UTC and send to backend
    • MotoAsh@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      1
      ·
      7 months ago

      That… still requires knowing which time zone to display. It doesn’t remove the requirement at all.

        • MotoAsh@lemmy.world
          link
          fedilink
          English
          arrow-up
          3
          ·
          edit-2
          7 months ago

          and who implements localtime? You realize these functions call down to the system, and the system is very much ALSO written and maintained by coders…

          The point is SOMEONE actually does have to implement it and maintain it.