Skip to content

Commit 10a3383

Browse files
burblebeetkoeppe
authored andcommitted
LWG4124 Cannot format zoned_time with resolution coarser than seconds
1 parent 62b187f commit 10a3383

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

source/time.tex

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10994,6 +10994,9 @@
1099410994

1099510995
\pnum
1099610996
\remarks
10997+
If the \fmtgrammarterm{chrono-specs} is omitted,
10998+
the result is equivalent to using \tcode{\%F \%T \%Z} as
10999+
the \fmtgrammarterm{chrono-specs}.
1099711000
If \tcode{\%Z} is used,
1099811001
it is replaced with \tcode{*f.abbrev}
1099911002
if \tcode{f.abbrev} is not a null pointer value.
@@ -11012,7 +11015,7 @@
1101211015
\begin{codeblock}
1101311016
template<class Duration, class TimeZonePtr, class charT>
1101411017
struct formatter<chrono::zoned_time<Duration, TimeZonePtr>, charT>
11015-
: formatter<chrono::@\placeholder{local-time-format-t}@<Duration>, charT> {
11018+
: formatter<chrono::@\placeholder{local-time-format-t}@<common_type_t<Duration, seconds>>, charT> {
1101611019
template<class FormatContext>
1101711020
typename FormatContext::iterator
1101811021
format(const chrono::zoned_time<Duration, TimeZonePtr>& tp, FormatContext& ctx) const;
@@ -11032,7 +11035,7 @@
1103211035
Equivalent to:
1103311036
\begin{codeblock}
1103411037
sys_info info = tp.get_info();
11035-
return formatter<chrono::@\placeholder{local-time-format-t}@<Duration>, charT>::
11038+
return formatter<chrono::@\placeholder{local-time-format-t}@<common_type_t<Duration, seconds>>, charT>::
1103611039
format({tp.get_local_time(), &info.abbrev, &info.offset}, ctx);
1103711040
\end{codeblock}
1103811041
\end{itemdescr}

0 commit comments

Comments
 (0)