Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I will literally fight you.
(I don't care about which is actually better, I'm sure there are arguments about why RFC3339 is better... but I just insist we all agree we use the same one, and that we all agree its ISO8601, or else date formatting is going to keep being a fucking thorn in every projects side) -
@HiFiWiFiSciFi the rfc one is based on the iso format, but leaves less wiggle room in terms of syntax
Like the 'T' between date and time is mandatory in the RFC, but not in the iso format. There are some other smaller changes.
So an RFC 3339 string is also compatible with the ISO 6801 afaik. -
If you have to use third party code, wrap it.
Literally every time i didn't wrap it immediately, i had to wrap it later... -
@Oktokolo I'm working with some legacy code that *almost* conforms to ISO/RFC so I had to replace two characters in the string
It's still confusing to me how std::chrono doesn't have a built in way to convert to std::tm -
@Oktokolo its nice and all, not reliant on time_t and meant as general purpose and all
but come on I have to convert it myself output it?? -
@LotsOfCaffeine
Well, maybe you win the lottery instead. I am pretty sure you bought a ticket recently...
Related Rants
After thorough considerations I came to the conclusion:
RFC3339 is better than ISO8601
Also working with time and dates in C++ is making my head hurt please help me
random
time
iso8601
rfc3339
date