On 28Mar2023 08:05, Dennis Lee Bieber <wlfr...@ix.netcom.com> wrote:
So far, you seem to be the only person who has ever asked for a
single
entity incorporating an EPOCH (datetime.datetime) + a DURATION
(datetime.timedelta).
But not the only person to want one. I've got a timeseries data format
where (within a file) time slots are represented as a seconds offset,
and the file has an associated epoch starting point. Dual to that is
that a timeslot has an offset from the file start, and that is
effectively a (file-epoch, duration) notion.
I've got plenty of code using that which passes around UNIX timestamp
start/stop pairs. Various conversions happen to select the appropriate
file (this keeps the files of bounded size while supporting an unbounded
time range).
Even a UNIX timestamp has an implied epoch, and therefore kind of
represents that epoch plus the timestamp as a duration.
I'm not sure I understand Loris' other requirements though. It might be
hard to write a general thing which was also still useful.
Cheers,
Cameron Simpson <c...@cskk.id.au>
--
https://mail.python.org/mailman/listinfo/python-list