ISO 8601 vs RFC 339
I had not heard of “RFC 339”, so I was initially confused.
I could not find an “official” statement of difference, but did find this:
What’s the difference between ISO 8601 and RFC 3339 Date Formats? – StackOverflow.com
RFC 3339 is listed as a profile of ISO 8601.
Most notably RFC 3339 requires a complete representation of date and time (only fractional seconds are optional). The RFC also has some small, subtle differences.
For example truncated representations of years with only two digits are not allowed – RFC 3339 requires 4-digit years, and the RFC only allows a period character to be used as the decimal point for fractional seconds.
The RFC also allows the “T” to be replaced by a space (or other character), while the standard only allows it to be omitted (and only when there is agreement between all parties using the representation).
I wouldn’t worry too much about the differences between the two, but on the off-chance your use case runs in to them, it’d be worth your while taking a glance at:
Wikipedia entry on ISO 8601
So, Mark, if I understand things correctly (please correct me if not), then your handlers produce a date format that meets both standards.
One other note: I read that if the “Z” is not at the end of the ISO 8601 date/time, then it is assumed to be in local time, which fits what AppleScript provides.
I’m not sure if this is pure ISO 8601 or not, but I like this format:
2017-12-02 19:51 GMT-0600
which shows me the time in my local time, but let’s other know the TZ offset.
It would be nice if your handler had a parameter for TZ. Something like:
L, Z, or ±nnn
for Local, Zulu, or specific time offset in