<div dir="auto">I love this discussion. I've been involved with computer time since the early 1970s. While at burger King I wrote a standardized set of time utilities in cobol. Later at Digital I was responsible for the utmp libraries, and the standard test failed. The issue was that the standard test used a future time beyond 2035. Back then tine_t was a signed 32 bit integer <br><br><div data-smartmail="gmail_signature">--<br>Jerry Feldman <<a href="mailto:gaf.linux@gmail.com">gaf.linux@gmail.com</a>><br>Boston Linux and Unix <a href="http://www.blu.org">http://www.blu.org</a><br>PGP key id: 6F6BB6E7<br>PGP Key fingerprint: 0EDC 2FF5 53A6 8EED 84D1 3050 5715 B88D 6F6<br>B B6E7</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 8, 2021, 2:00 PM Joshua Judson Rosen <<a href="mailto:rozzin@hackerposse.com">rozzin@hackerposse.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 3/6/21 7:46 PM, Ben Scott wrote:<br>
> On Thu, Mar 4, 2021 at 9:57 PM Joshua Judson Rosen<br>
> <<a href="mailto:rozzin@hackerposse.com" target="_blank" rel="noreferrer">rozzin@hackerposse.com</a>> wrote:<br>
>> And as a general word of advice from someone whose been burnt way too many times:<br>
>> if you're going to put timestamps in your filenames, either just use UTC<br>
>> or explicitly indicate which timezone the timestamps are assuming.<br>
> <br>
> Even that's not enough, because the stupid humans keep changing what<br>
> the time zones mean. Say you find a file that has a stored time of<br>
> 2007 MAR 31 17:00 UTC. If that file was written before 2005, then the<br>
> offset to US Eastern is 5 hours. If that file was written after 2005,<br>
> the offset is 4 hours. Which did the human mean when they instructed<br>
> the computer to write the file? No way of knowing, in the general<br>
> case.<br>
<br>
Well..., I _did_ say "either... or...". The general idea is just `don't assume<br>
that the reader will just know what scale/units you're using without it being declared'.<br>
<br>
But some things that I really neglected to mention were:<br>
<br>
1) that "indicate which timezone" is itself actually multiple different approaches:<br>
hours offset from UTC, or the _symbolic_ timezone that automatically adjusts<br>
to changing politics.<br>
2) if you want to use those stamps to actually _convey information_, then<br>
which one of _those_ you need depends on specifically what you're doing:<br>
sometimes you want to indicate an actual point on the general timeline,<br>
sometimes you want to indicate how something fits into the local schedule<br>
or relates to `solar time' (e.g.: as a _nerd_, I thought it'd be a great idea<br>
to set my digital cameras' clocks to UTC and just never deal with DST or<br>
any other timezone issues when traveling..., and then as a _photographer_ I realized<br>
what a lousy idea that could end up being...).<br>
3) sometimes you need to indicate _both_<br>
4) you might even need to give your symbolic timezone, your timezone offset, _and_ UTC..., _and_....<br>
<br>
... BUT: even if you only do any arbitrary one of those things, at least you won't end up<br>
mistakenly overwriting your records due to multiple distinct points in time<br>
end up generating the same filename.<br>
<br>
(the inverse issue, of whether you end up mistakenly _failing to generate collisions when you want to_<br>
can also be a concern of course; but I'd rather leave that as an exercise to the reader..., or to Ben ;p)<br>
<br>
I *also* didn't even touch on how much all of this will annoy people who like nicely-sorting filenames... ;p<br>
<br>
Every once in a while, I go back to try to find a solution to all of the other problems that also<br>
fits in with _that_, and just fail. Basically..., whenever anyone asks me "what time is it?".<br>
And I think I've been at that for 10 years now....<br>
_______________________________________________<br>
gnhlug-discuss mailing list<br>
<a href="mailto:gnhlug-discuss@mail.gnhlug.org" target="_blank" rel="noreferrer">gnhlug-discuss@mail.gnhlug.org</a><br>
<a href="http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/" rel="noreferrer noreferrer" target="_blank">http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/</a><br>
</blockquote></div>