• Venator@lemmy.nz
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    16 days ago

    You don’t need the precision of seconds for that sort of calculation however, so can use a signed int representing date rather than datetime for that.

    • 9point6@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      16 days ago

      “Generally” is doing a lot of heavy lifting in your responses

      Unless it covers all use cases, it’s not good enough, because that’s what we basically already have today.

      We all settled on using seconds (and later smaller increments) since the 1970 epoch across systems because it makes moving data around easier.

      It’s better to have one source of truth value and then you derive everything else from that, keeping a 2nd counter of days (which would also need to be signed, there’s no first date of all time) rather than just doing some maths when you need it isn’t good system design

      Edit: and surreptitiously editing “generally” out of your comments, after I mentioned it, just makes the statement false, as well as both being kinda poor etiquette and missing the point a bit