[all-commits] [llvm/llvm-project] 6327ae: [libc++][TZDB] Improves time zone format specifiers.
Mark de Wever via All-commits
all-commits at lists.llvm.org
Tue Mar 19 07:39:25 PDT 2024
Branch: refs/heads/users/mordante/fixes_chrono_formatter_time_zone_information
Home: https://github.com/llvm/llvm-project
Commit: 6327aeec1a6adfb1be3dcb95aa1f0ad6204213f4
https://github.com/llvm/llvm-project/commit/6327aeec1a6adfb1be3dcb95aa1f0ad6204213f4
Author: Mark de Wever <koraq at xs4all.nl>
Date: 2024-03-19 (Tue, 19 Mar 2024)
Changed paths:
M libcxx/include/__chrono/formatter.h
M libcxx/test/std/time/time.syn/formatter.file_time.pass.cpp
M libcxx/test/std/time/time.syn/formatter.sys_time.pass.cpp
Log Message:
-----------
[libc++][TZDB] Improves time zone format specifiers.
Per [tab:time.format.spec]
%z The offset from UTC as specified in ISO 8601-1:2019, subclause
5.3.4.1. For example -0430 refers to 4 hours 30 minutes behind UTC.
If the offset is zero, +0000 is used. The modified commands %Ez and
%Oz insert a : between the hours and minutes: -04:30. If the offset
information is not available, an exception of type format_error is
thrown.
Typically the modified versions Oz or Ez would have wording like
The modified command %OS produces the locale's alternative
representation.
In this case the modified version does not depend on the locale.
This change is a preparation for formatting sys_info which has time zone
information. The function time_put<_CharT>::put() does not have proper
time zone support, therefore it's a manual implementation.
Fixes https://github.com/llvm/llvm-project/issues/78184
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list