-
Notifications
You must be signed in to change notification settings - Fork 698
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
[Question] Why are there two adjacent space characters (0x20
) in the what()
message of ambiguous_local_time
?
#782
Comments
0x20
) in the what()
message of ambiguous_local_time
0x20
) in the what()
message of ambiguous_local_time
?
Blame it on my 2nd grade teacher ... and this: https://www.gocomics.com/bloom-county/2015/10/04 |
Traditionally, two spaces were placed after the end of one sentence and
before the beginning of the next in type-written text.
So, it could be just a carry-over of that convention.
…On Wed, Apr 12, 2023 at 2:35 AM Jakub Mazurkiewicz ***@***.***> wrote:
Repro:
#include <chrono>
#include <date/tz.h>
#include <iostream>
int main() {
using namespace date;
using namespace std::chrono_literals;
try {
auto zt = zoned_time{"America/New_York",
local_days{Sunday[1] / November / 2016} + 1h + 30min};
} catch (const ambiguous_local_time &e) {
std::cout << e.what() << '\n';
}
}
Result:
$ g++ main.cpp -std=c++20 -I../include ../build/libdate-tz.a
$ ./a.out2016-11-06 01:30:00 is ambiguous. It could be2016-11-06 01:30:00 EDT == 2016-11-06 05:30:00 UTC or2016-11-06 01:30:00 EST == 2016-11-06 06:30:00 UTC
Why are there two space characters between *"ambiguous."* and *"It could"*?
Is there any reason or is it just a typo?
If it is a typo:
- It looks like is has been here since the beginning:
https://github.com/HowardHinnant/date/blame/master/include/date/tz.h#L265-L266
,
- This typo made it into C++ standard: [time.zone.exception.ambig]/3
<http://eel.is/c++draft/time.zone.exception.ambig#3>,
- microsoft/STL#3650 <microsoft/STL#3650>
should probably be closed without merging.
—
Reply to this email directly, view it on GitHub
<#782>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCAHBQRTTS77CL77XDAQEDXAZSLPANCNFSM6AAAAAAW3LHCTM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Jonathan Leffler ***@***.***> #include <disclaimer.h>
Guardian of DBD::Informix - v2018.1031 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."
|
Thanks for explanation, to be honest I've never seen two spaces separating sentences (only one). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Repro:
Result:
Why are there two space characters between "ambiguous." and "It could"? Is there any reason or is it just a typo?
If it is a typo:
ambiguous_local_time
's message is slightly incorrect microsoft/STL#3650 should probably be closed without merging.The text was updated successfully, but these errors were encountered: