What is the UNIX time stamp for the Bible?
Discussion
I guess the time of the publishing of that version? Okay, but then we definitely have to name the version.
for dates, designate a standard format like 1022-04-20 - this also is conveniently lexicographically sorted
I'm thinking they went with UNIX timestamp because they assumed the source would always be another note.
or they didn't think about the problem of how much public domain literature there is that overflows even negative unix int64 timestamps - it's 1970-2140 for 64 bits - 2037 for 32 bits, so i think if you allow negative ones to mean before UNIX epoch then it couldn't be more than 1800 before it flips to ~2140
nah, in fact, relays can and do reject events with funny timestamps, certainly, auth timestamps "should be" constrained to a short window of a minute or less in order to stop replay attacks
haha, that's more than 64 bits even if we allow those past dates to have negative numbers they will only give us until like 1630 or something
UNIX timestamp for Plato's Republic, assuming 01 January 392 B. C. at 12:00 am is -19374092131393201937362373274. 🤣
over 19 digits is more than 64 bits
but, interesting point, the value is a JSON integer, i don't think it allows over 64 bit unsigned anyhow
bigger numbers are generally treated using generalised "big integer" math that uses byte arrays and arbitrary lengths, and to encode them in JSON you will usually then need to put them in a string, that's also why they are strings for npubs and event ids
also, -382-01-01T12:00 is shorter