you are viewing a single comment's thread
view the rest of the comments
[–] 2 points 4 weeks ago* (last edited 4 weeks ago) (3 children)

Doesn't need to be 64 bit to be unsigned... And the system clock only goes up, so no need to represent system time as earlier than 1970...

  • source
  • parent
  • hideshow 3 child comments
  • [–] 3 points 4 weeks ago (2 children)

    If you want computers to not have an arbitrary line in the sand when referring to the past, you need to be able to do calculations with time from before the epoch, that's why it needs to be signed.

    Off the top of my head, working out the age of someone born before 1970 is going to be a calculation that happens countless times a day

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 4 weeks ago* (last edited 4 weeks ago) (1 child)

    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.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 5 points 4 weeks ago* (last edited 4 weeks 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

  • source
  • parent