GitHub PushEvent at 2014-10-17 02:06:21
Repository: postgres
Actor: fabriziomello
Payload: {"shas":[["b2cbced9eef20692b51a84d68d469627f4fc43ac","ffeaa947aef224da9ba99b6a18bdd74288df0e3e@sss.pgh.pa.us","Support timezone abbreviations that sometimes change.\n\nUp to now, PG has assumed that any given timezone abbreviation (such as\n\"EDT\") represents a constant GMT offset in the usage of any particular\nregion; we had a way to configure what that offset was, but not for it\nto be changeable over time.  But, as with most things horological, this\nview of the world is too simplistic: there are numerous regions that have\nat one time or another switched to a different GMT offset but kept using\nthe same timezone abbreviation.  Almost the entire Russian Federation did\nthat a few years ago, and later this month they're going to do it again.\nAnd there are similar examples all over the world.\n\nTo cope with this, invent the notion of a \"dynamic timezone abbreviation\",\nwhich is one that is referenced to a particular underlying timezone\n(as defined in the IANA timezone database) and means whatever it currently\nmeans in that zone.  For zones that use or have used daylight-savings time,\nthe standard and DST abbreviations continue to have the property that you\ncan specify standard or DST time and get that time offset whether or not\nDST was theoretically in effect at the time.  However, the abbreviations\nmean what they meant at the time in question (or most recently before that\ntime) rather than being absolutely fixed.\n\nThe standard abbreviation-list files have been changed to use this behavior\nfor abbreviations that have actually varied in meaning since 1970.  The\nold simple-numeric definitions are kept for abbreviations that have not\nchanged, since they are a bit faster to resolve.\n\nWhile this is clearly a new feature, it seems necessary to back-patch it\ninto all active branches, because otherwise use of Russian zone\nabbreviations is going to become even more problematic than it already was.\nThis change supersedes the changes in commit 513d06ded et al to modify the\nfixed meanings of the Russian abbreviations; since we've not shipped that\nyet, this will avoid an undesirably incompatible (not to mention incorrect)\nchange in behavior for timestamps between 2011 and 2014.\n\nThis patch makes some cosmetic changes in ecpglib to keep its usage of\ndatetime lookup tables as similar as possible to the backend code, but\ndoesn't do anything about the increasingly obsolete set of timezone\nabbreviation definitions that are hard-wired into ecpglib.  Whatever we\ndo about that will likely not be appropriate material for back-patching.\nAlso, a potential free() of a garbage pointer after an out-of-memory\nfailure in ecpglib has been fixed.\n\nThis patch also fixes pre-existing bugs in DetermineTimeZoneOffset() that\ncaused it to produce unexpected results near a timezone transition, if\nboth the \"before\" and \"after\" states are marked as standard time.  We'd\nonly ever thought about or tested transitions between standard and DST\ntime, but that's not what's happening when a zone simply redefines their\nbase GMT offset.\n\nIn passing, update the SGML documentation to refer to the Olson/zoneinfo/\nzic timezone database as the \"IANA\" database, since it's now being\nmaintained under the auspices of IANA.","Tom Lane",false]],"size":1,"ref":"refs/heads/discard_extensions","head":"b2cbced9eef20692b51a84d68d469627f4fc43ac"}