summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qnamespace.qdoc
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2020-09-30 12:51:18 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2020-10-07 15:57:43 +0200
commit6404084b9c1eba20421ced02a123bec7b857f012 (patch)
tree02032d6df6095ba6aa52d941d96edc5cd7f87e07 /src/corelib/global/qnamespace.qdoc
parente1e61daf39903b8b7595465c50a9871dea308f06 (diff)
Use start of day when wrapping 24:00 to the next day
Previously we used 0:0 on the next day, which might fall in a fall-back's gap. [ChangeLog][QtCore][QDateTime] When fromString() reads 24:00 in ISO format, it now uses the start of the next day, rather than 0:0 on the next day. This only makes a difference if the next day's first hour is skipped by a time-zone transition. Change-Id: Ib81feca5dc09fa735321b6ab76d5d118d6db6fd2 Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/global/qnamespace.qdoc')
-rw-r--r--src/corelib/global/qnamespace.qdoc33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index c81608ab4d..a877b17a4f 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -704,22 +704,23 @@
\note For \c ISODate formats, each \c y, \c M and \c d represents a single
digit of the year, month, and day used to specify the date. Each \c H, \c m,
and \c s represents a single digit of the hour (up to 24), minute and second
- used to specify the time. A \c{.zzz} stands for a fractional part suffix on
- the preceding field, which may be separated from that field either by a
- comma \c{','} or the dot \c{'.'} shown. Precision beyond milliseconds is
- accepted but discarded, rounding to the nearest millisecond or, when
- rounding fractional seconds up would change the second field, rounded
- down. The presence of a literal \c T character is used to separate the date
- and time when both are specified. For the \c TextDate and \c RFC2822Date
- formats, \c{ddd} stands for the first three letters of the name of the day
- of the week and \c{MMM} stands for the first three letters of the month
- name. The names of days and months are always in English (C locale)
- regardless of user preferences or system settings. The other format
- characters have the same meaning as for the ISODate format. Parts of the
- format enclosed in square brackets \c{[...]} are optional; the square
- brackets do not form part of the format. The plus-or-minus character \c{'±'}
- here stands for either sign character, \c{'-'} for minus or \c{'+'} for
- plus.
+ used to specify the time. An hour of 24, with zero for all other time
+ fields, is understood as the start of the next day. A \c{.zzz} stands for a
+ fractional part suffix on the preceding field, which may be separated from
+ that field either by a comma \c{','} or the dot \c{'.'} shown. Precision
+ beyond milliseconds is accepted but discarded, rounding to the nearest
+ millisecond or, when rounding fractional seconds up would change the second
+ field, rounded down. The presence of a literal \c T character is used to
+ separate the date and time when both are specified. For the \c TextDate and
+ \c RFC2822Date formats, \c{ddd} stands for the first three letters of the
+ name of the day of the week and \c{MMM} stands for the first three letters
+ of the month name. The names of days and months are always in English (C
+ locale) regardless of user preferences or system settings. The other format
+ characters have the same meaning as for the ISODate format, except that 24
+ is not accepted as an hour. Parts of a format enclosed in square brackets
+ \c{[...]} are optional; the square brackets do not form part of the
+ format. The plus-or-minus character \c{'±'} here stands for either sign
+ character, \c{'-'} for minus or \c{'+'} for plus.
\sa QDate::toString(), QTime::toString(), QDateTime::toString(),
QDate::fromString(), QTime::fromString(), QDateTime::fromString()