-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking Issue for Extensions to Chrono #1704
Comments
Is this something being tracked in the ucrt team's backlog? |
@amyw-msft (who works on the UCRT) has an internal spreadsheet tracking the status of "Additional |
There are not plans to implement strftime %O and %E. Our implementation is backed by the Win32 Locale APIs which don't really have a concept of a single "alternate calendar" or "alternate numeric system". |
we could just implement O and E as identical to o and e for all locales, I think that would conform. |
@barcharcraz, can you think of a test which shows in what way it doesn't conform today? I started with: // file: strftime_test.c
// compile cmd: cl.exe strftime_test.c
// (Compiler Version 19.28.29914)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
int main (void)
{
struct tm tm =
{
.tm_year = 102,
.tm_mon = 2,
.tm_mday = 1
};
char buf[100];
if (strftime (buf, sizeof (buf), "Ec = %Ec\nOe = %Oe", &tm) == 0)
{
puts ("initial strftime failed");
exit (1);
}
printf ("%s\n", buf);
return 0;
}
// output:
//
// Ec = Sun Mar 1 00:00:00 2002
// Oe = 1 |
If |
Yes, it seems like compiler just falls back or in other words, it ignores %E and %O. From the conformance table https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=msvc-160, I think we can update this line:
to reflect that strftime() E/O options are (also) unlikely to be implemented? |
I can modify the issue content to reflect that we're not "actively waiting" for |
📄 Primary Sources
<chrono>
Calendars And Time Zones<chrono>
Calendars And Time Zones<chrono>
std::chrono::days
With Suffix"d"
leap
Toleap_second
link
Totime_zone_link
🚧 Status
<chrono>
project🗺️ Roadmap
<chrono>
project for a complete list.<chrono>
had many moving parts, many of which depended on each other. The rough dependency graph below helped guide the order of implementation for the various pieces (e.g.,sys_info
,local_info
➡️zoned_time
means thatsys_info
,local_info
are required forzoned_time
).<chrono>
: Implement fallback mechanism for chrono's[time.zone]
#1911 to track this work.⌨️ Blogpost / Documentation Notes
file_clock::to_utc
andfile_clock::from_utc
implementations (instead of theto_sys
,from_sys
option instead), we should include the note that pre-2017 leap seconds will not be representable throughfile_time
(asFILETIME
only became leap-second-aware as of Server 2019 and Windows 10 October update).time_zone_link
).time_zone
s, and have notime_zone_link
s. This means that we will supply a superset of the IANA standard and alternate time zones astime_zone
s, with a few exceptions:sys_info
containsbegin
andend
members whose intent is described here: [time.zone.info.sys]/3 - their range is not specified, but we plan to enforce that they are clamped atchrono::year::min()
andchrono::year::max()
.[time.format]
implementation relies onstrftime
for handling of many of the specifiers. Currently,strftime
does not yet support some of the modifiers (e.g.,O
andE
) that it should, and support for this is not expected anytime soon (due dependency on Win32 locale APIs). We do not attempt to handle these cases manually, but our implementation should be conformant in this respect ifstrftime
's implementation also becomes conformant.The text was updated successfully, but these errors were encountered: