Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9ef2c65

Browse files
committed
Doc: fix bogus example about ambiguous timestamps.
I had a brain fade in commitd328991, and used 2:30AM as theexample timestamp for both spring-forward and fall-back cases.But it's not actually ambiguous at all in the fall-back case,because that transition is from 2AM to 1AM under USA rules.Fix the example to use 1:30AM, which *is* ambiguous.Noted while answering a question from Aleksander Alekseev.Back-patch to all supported branches.Discussion:https://postgr.es/m/2191355.1641828552@sss.pgh.pa.us
1 parent90657b4 commit9ef2c65

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

‎doc/src/sgml/datetime.sgml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -210,27 +210,25 @@
210210
<para>
211211
Conversely, consider the behavior during a fall-back transition:
212212
<programlisting>
213-
=&gt; SELECT '2018-11-0402:30'::timestamptz;
213+
=&gt; SELECT '2018-11-0401:30'::timestamptz;
214214
timestamptz
215215
------------------------
216-
2018-11-0402:30:00-05
216+
2018-11-0401:30:00-05
217217
(1 row)
218218
</programlisting>
219-
On that date, there were two possible interpretations of2:30AM; there
220-
was2:30AM EDT, and then an hour later afterthe reversion to standard
221-
time, there was2:30AM EST.
219+
On that date, there were two possible interpretations of1:30AM; there
220+
was1:30AM EDT, and then an hour later afterclocks jumped back from
221+
2AM EDT to 1AM EST, there was1:30AM EST.
222222
Again, <productname>PostgreSQL</productname> interprets the given time
223-
as if it were standard time (UTC-5). We can force thematter by
224-
specifying daylight-savings time:
223+
as if it were standard time (UTC-5). We can force theother
224+
interpretation byspecifying daylight-savings time:
225225
<programlisting>
226-
=&gt; SELECT '2018-11-0402:30 EDT'::timestamptz;
226+
=&gt; SELECT '2018-11-0401:30 EDT'::timestamptz;
227227
timestamptz
228228
------------------------
229-
2018-11-04 01:30:00-05
229+
2018-11-04 01:30:00-04
230230
(1 row)
231231
</programlisting>
232-
This timestamp could validly be rendered as either 2:30 UTC-4 or
233-
1:30 UTC-5; the timestamp output code chooses the latter.
234232
</para>
235233

236234
<para>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp