[Datetime-SIG] Clearing up terminology
Felipe Ochoa
felipe.nospam.ochoa at gmail.com
Wed Jul 29 23:31:20 CEST 2015
Jon Skeet has created what I think would be a very useful guide for people
on this list to read. He provides some great (precisely defined)
terminology we should adopt to move away from "naive" and "aware."
Hopefully this will ease some of the communication difficulties we're
experiencing.
http://nodatime.org/1.2.x/userguide/concepts.html
TL;DR: here's a glossary of terms:
* local vs global: "The key difference is that people all around the world
will agree on a global value simultaneously, whereas they may all see
different local values for the same global value, due to time zones." Local
values are what Guido has labeled "naive" -- in the sense that they don't
have a datetime.
* Instant: a point on the non-relativistic time line. Isomorphic to "the
number of seconds since the unix epoch". It doesn't make sense to talk
about time zones with instants
* Calendar system: a means of breaking up the time line into "units such as
years, months, days, hours, minutes, and so on"
* Time zone: "a mapping from UTC instants to offsets"
* Offset: "simply the difference between UTC and local time."
* ZonedDatetime: An instant + a time zone
* OffsetDatetime: An instant + an offset (which is not the same as a
ZonedDatetime!)
* LocalDatetime: A date/time in the usual "naive" sense: a combination of
year, month, day, hour, minute, second, millisecond (soon to be nano?)
* Duration: The difference between two instants. "A fixed number of ticks".
What has also been called "stopwatch deltas". Skeet says, "it's the same
length of time wherever it's applied. Duration is used for arithmetic on
Instant and DateTime values."
* Period: "a set of values associated with different calendar-based
periods: years, months, weeks, days, hours, minutes and so on. Some of
these periods represent different lengths of time depending on what they're
applied to."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150729/bc74e845/attachment.html>
More information about the Datetime-SIG
mailing list