diff options
author | Stuart Bishop <stuart@stuartbishop.net> | 2014-03-14 15:26:36 +0700 |
---|---|---|
committer | Stuart Bishop <stuart@stuartbishop.net> | 2014-03-14 15:26:36 +0700 |
commit | cf78d26eabd1ea7960d47921271152834128be50 (patch) | |
tree | 5b7bd7b2d7467130be13a3c53a12add0475c84af /src | |
parent | 4ed0cfa6d3ae3ba79bf4e8d3347b4c385fb405e7 (diff) | |
download | pytz-cf78d26eabd1ea7960d47921271152834128be50.tar.gz |
UTC/GMT clarifications from Ben Finney
Diffstat (limited to 'src')
-rw-r--r-- | src/README.txt | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/src/README.txt b/src/README.txt index 9dcbfa0..0ed6a7f 100644 --- a/src/README.txt +++ b/src/README.txt @@ -288,12 +288,16 @@ True >>> pytz.utc is pytz.UTC is pytz.timezone('UTC') True -Note that this instance is not the same instance (or implementation) as -other timezones with the same meaning (GMT, Greenwich, Universal, etc.). +Note that some other timezones are commonly thought of as the same (GMT, +Greenwich, Universal, etc.). The definition of UTC is distinct from these +other timezones, and they are not equivalent. For this reason, they will +not compare the same in Python. ->>> utc is pytz.timezone('GMT') +>>> utc == pytz.timezone('GMT') False +See the section `What is UTC`_, below. + If you insist on working with local times, this library provides a facility for constructing them unambiguously: @@ -415,13 +419,19 @@ New Zealand What is UTC ~~~~~~~~~~~ -'UTC' is Universal Time, also known as Greenwich Mean Time or GMT -in the United Kingdom. All other timezones are given as offsets from -UTC. No daylight savings time occurs in UTC, making it a useful timezone -to perform date arithmetic without worrying about the confusion and -ambiguities caused by daylight savings time transitions, your country -changing its timezone, or mobile computers that move roam through -multiple timezones. +'UTC' is `Coordinated Universal Time`_. It is a successor to, but distinct +from, Greenwich Mean Time (GMT) and the various definitions of Universal +Time. UTC is now the worldwide standard for regulating clocks and time +measurement. + +All other timezones are defined relative to UTC, and include offsets like +UTC+0800 — hours to add or subtract from UTC to derive the local time. No +daylight saving time occurs in UTC, making it a useful timezone to perform +date arithmetic without worrying about the confusion and ambiguities caused +by daylight saving time transitions, your country changing its timezone, or +mobile computers that roam through multiple timezones. + +.. _Coordinated Universal Time: https://en.wikipedia.org/wiki/Coordinated_Universal_Time Helpers |