[all-commits] [llvm/llvm-project] d39b5b: [libc++][TZDB] Improves time zone format specifiers.
Mark de Wever via All-commits
all-commits at lists.llvm.org
Tue Apr 16 11:16:36 PDT 2024
Branch: refs/heads/users/mordante/fixes_chrono_formatter_time_zone_information
Home: https://github.com/llvm/llvm-project
Commit: d39b5b5ed669cb7e06677a86ca98d2fcf42a97ce
https://github.com/llvm/llvm-project/commit/d39b5b5ed669cb7e06677a86ca98d2fcf42a97ce
Author: Mark de Wever <koraq at xs4all.nl>
Date: 2024-04-16 (Tue, 16 Apr 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