Kind of puzzled about timestamps

Jerry Feldman gaf.linux at gmail.com
Mon Mar 8 14:16:35 EST 2021


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

--
Jerry Feldman <gaf.linux at gmail.com>
Boston Linux and Unix http://www.blu.org
PGP key id: 6F6BB6E7
PGP Key fingerprint: 0EDC 2FF5 53A6 8EED 84D1  3050 5715 B88D 6F6
B B6E7

On Mon, Mar 8, 2021, 2:00 PM Joshua Judson Rosen <rozzin at hackerposse.com>
wrote:

> On 3/6/21 7:46 PM, Ben Scott wrote:
> > On Thu, Mar 4, 2021 at 9:57 PM Joshua Judson Rosen
> > <rozzin at hackerposse.com> wrote:
> >> And as a general word of advice from someone whose been burnt way too
> many times:
> >> if you're going to put timestamps in your filenames, either just use UTC
> >> or explicitly indicate which timezone the timestamps are assuming.
> >
> > Even that's not enough, because the stupid humans keep changing what
> > the time zones mean.  Say you find a file that has a stored time of
> > 2007 MAR 31 17:00 UTC.  If that file was written before 2005, then the
> > offset to US Eastern is 5 hours.  If that file was written after 2005,
> > the offset is 4 hours.  Which did the human mean when they instructed
> > the computer to write the file?  No way of knowing, in the general
> > case.
>
> Well..., I _did_ say "either... or...". The general idea is just `don't
> assume
> that the reader will just know what scale/units you're using without it
> being declared'.
>
> But some things that I really neglected to mention were:
>
>         1) that "indicate which timezone" is itself actually multiple
> different approaches:
>            hours offset from UTC, or the _symbolic_ timezone that
> automatically adjusts
>            to changing politics.
>         2) if you want to use those stamps to actually _convey
> information_, then
>            which one of _those_ you need depends on specifically what
> you're doing:
>            sometimes you want to indicate an actual point on the general
> timeline,
>            sometimes you want to indicate how something fits into the
> local schedule
>            or relates to `solar time' (e.g.: as a _nerd_, I thought it'd
> be a great idea
>            to set my digital cameras' clocks to UTC and just never deal
> with DST or
>            any other timezone issues when traveling..., and then as a
> _photographer_ I realized
>            what a lousy idea that could end up being...).
>         3) sometimes you need to indicate _both_
>         4) you might even need to give your symbolic timezone, your
> timezone offset, _and_ UTC..., _and_....
>
> ... BUT: even if you only do any arbitrary one of those things, at least
> you won't end up
> mistakenly overwriting your records due to multiple distinct points in time
> end up generating the same filename.
>
> (the inverse issue, of whether you end up mistakenly _failing to generate
> collisions when you want to_
>   can also be a concern of course; but I'd rather leave that as an
> exercise to the reader..., or to Ben ;p)
>
> I *also* didn't even touch on how much all of this will annoy people who
> like nicely-sorting filenames... ;p
>
> Every once in a while, I go back to try to find a solution to all of the
> other problems that also
> fits in with _that_, and just fail. Basically..., whenever anyone asks me
> "what time is it?".
> And I think I've been at that for 10 years now....
> _______________________________________________
> gnhlug-discuss mailing list
> gnhlug-discuss at mail.gnhlug.org
> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.gnhlug.org/pipermail/gnhlug-discuss/attachments/20210308/3222fa2a/attachment.html 


More information about the gnhlug-discuss mailing list