Changing 32-bit time_t to unsigned suddenly makes all dates from 1902 to Jan 1 1970 which were stored using time_t (even if it was non-advisable, it still will have occurred) appear to teleport into the future beyond 2038.
So any pre-1970 32-bit signed timestamps will be in... not spreadsheets, in what? In databases? No, not either. So in some sort of documents, so software consuming those will need fixing, but we're not going to see much teleporting of 1902-1970 timestamps to 2038-2106. I'm not concerned.
$ git commit -m foo --date='1969-12-31 00:00:00'
[main 25b6e63] foo
Date: Sun Dec 30 23:00:00 2012 -0500
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 barIf, however, Git were to some day get an option to set file mtimes and atimes at clone time to the last-modified time of the files based on commit history, then you could always just use a 64-bit system where `time_t` is 64-bit.
This is intentional btw because otherwise with many build system things would not get rebuilt correctly when checking out an older snapshot.
To me that wouldn't seem right: a date of birth isn't a timestamp and you typically receive it without a corresponding place or time zone so there's no reasonable way to convert it into a timestamp.
(The other problem is that a signed 32-bit time_t only goes back to 1901. You might not have to deal with a date of birth before 1901 today, unless you're doing genealogy, of course, but until fairly recently it's something you'd probably want to be able to handle.)
Setting the bottom couple of bytes to zero achieves this, while maintaining nearly universal consistency with all other events in time that might need to be related with a packing of bits. People do it because it's what's being used at nearly every other level of the stack.
That's not the same thing as `time_t` though. `time_t` is UTC. UTC is not `time_t`.
I have seen people in real life use seconds since the UNIX epoch to represent DOB, yes.
https://www.postgresql.org/docs/current/datatype-datetime.ht...