Re: Date/Time Types : internals
От | Robert Haas |
---|---|
Тема | Re: Date/Time Types : internals |
Дата | |
Msg-id | CA+TgmoZ11Ac_eyStw2bEh-Hk7KYqujAAES=WU_hDQvQHCH=JUQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Date/Time Types : internals (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Date/Time Types : internals
|
Список | pgsql-docs |
On Wed, Apr 18, 2012 at 4:14 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > "Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes: >> I guess the point is that for hundreds of years, the same day could >> have a different date depending which country's calendar you were >> looking at. I'm not entirely clear why there's a problem if you >> pick the Gregorian calendar and apply it retroactively. > > Which is, in fact, exactly what our code does. I think that bit in the > docs is trying to explain why we do that rather than try to get the > code to reflect what people really used back then. What I find a bit confusing is that this part talks about the Julian calendar, but elsewhere: <para> The SQL standard states that <quote>Within the definition of a <quote>datetime literal</quote>, the <quote>datetime value</quote>s are constrained by the natural rules for dates and times according to the Gregorian calendar</quote>. Dates between 1582-10-05 and 1582-10-14, although eliminated in some countries by Papal fiat, conform to <quote>natural rules</quote> and are hence valid dates. <productname>PostgreSQL</> follows the SQL standard's lead by counting dates exclusively in the Gregorian calendar, even for years before that calendar was in use. </para> So which calendar are we using, Julian or Gregorian? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-docs по дате отправления: