6

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

Comments
  • 4
    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)
  • 6
    @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.
  • 6
    @LotsOfCaffeine Oh... well then I'll allow it.
  • 3
    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...
  • 1
    @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
  • 1
    @LotsOfCaffeine
    But look how fast it is.
  • 1
    @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??
  • 1
    @LotsOfCaffeine
    Did you expect sanity in C++ land?
  • 1
    @Oktokolo no, but I would have appreciated it :/
  • 0
    @LotsOfCaffeine
    Well, maybe you win the lottery instead. I am pretty sure you bought a ticket recently...
  • 1
    @Oktokolo I guess the ticket's my work contract
  • 1
    @Oktokolo yup, or else you catch code crabs
Add Comment