15 ms·
ISO-8601 date format reference not publicly available
- koblas 6y agoOne should use RFC 3339 dates which have a formal grammar and and open standard.
- chrismeller 6y agoAbsolutely. They even reference ISO 8601 in the spec when specifying that the T and Z can also be lowercase. As far as I’m aware, the only difference between the two is something related to the - in the time zone offset... though I’ve also seen plenty of libraries parse 8601 with and without -, so it seems not to be super important.
- d0mine 6y agorfc3339 is a profile of iso8601 i.e., every rfc3339 date is also iso8601 date but not in reverse
- chrismeller 6y agoDo you have an example of an 8601 that is not 3339 compliant? I’ve never looked at any of the abbreviated formats, but if you’re giving a full date, time, and offset it seems identical (aside from that -).
- ncallaway 6y agoSure! 2021-W07-5
- deleted 6y ago[deleted]
- chrismeller 6y agoAhh, you got me. I thought I had mentioned that I had never looked at any of the formats for shorter than full date, time, and offset strings. D’oh!
- ncallaway 6y agoI'm _fairly_ sure that 2021-W07-5T00:00:00Z or 2000-W03-7T01:23:45.678+09:00 would be a valid full ISO date time and offset as well, but I haven't checked the specification. Luxon will happily parse 2021-W07-5T00:00:00Z and tell me that it represents 2021-02-18T16:00:00.000-08:00, so I think it's valid.
- Darkphibre 6y ago"Funny" story about a binary 8601 implementation. I was architecting a true-realtime telemetry pipeline for a AAA videogame studio (later used by a dozen or so franchises for all titles by the publisher). It had a requirement for subsecond client notification of per-user aggregated statistics, including complicated event interactions (such as ensuring the grenade that you threw that killed someone, would only be attributed to you if a prior event hadn't already occured), which resulted in sequentiality guarantees. But with that, we could get rid of windowed event processing (and those inherent latencies), and instead treat them as a true stream of events. Keep in mind we could support up to 400ms one-way latency, so we only had 200ms for processing/routing in the client and in the cloud. I measured client code in μs. Annnyways. The principal in our org insisted that time not be be transmitted as an epoch. I argued for weeks, but he was insistent... "No magical offsets to arbitrary dates. ISO8601. Do it." He came from and worked most heavily with the web services group. Apparently some point in the past, services had picked the wrong epoch and there was confusion (I still can't understand how that wouldn't be caught right away, there's only a few standard epochs that are quite different in resulting time)? The events in my design were bit-packed using a competing protocol to Protocol Buffers... there's no way I was doubling the payloads just to store a timestamp as a string. So I read and re-read ISO8601. And it dawned on me: ISO-8601 never specifies the encoding. It specifies the order in which information is conveyed, and if in text, the delimiters to use. One example clue is in the definition of basic format, and the call-out that most of the document leverages plain text to communicate their ideas. basic format format of a date and time representation or date and time format representation comprising the minimum number of time elements necessary for the accuracy required. The basic format should be avoided in plain text. I ended up proposing the most terrible hack I've had to live with. It involved bit-packed 64-bit integer that stored: 12 bits for year, 4 bits for month, 5 bits for date, 5 bits for hours, 6 bits for minutes, 6 bits for seconds, and the remaining bits for an integer that stores the sub-second fraction. We lost a few orders of magnitude resolution on that end due to the inefficiencies of the earlier packing, but... it worked. And it was in the right order. And there were no "magic" epochs to dissuade the principal engineer. Most importantly, it sailed through the review process. Still makes my skin crawl a decade later. And I secretly suspect you technically have to have a T between date and time to be ISO8601 compliant, it's been a long while since I read the spec. But there you go.
- andoriyu 6y agoSure, `20201209T160953Z` or 2021-123.
- seagreen 6y agoThis gets repeated a lot but unfortunately isn't true. See the spec: https://tools.ietf.org/html/rfc3339 https://tools.ietf.org/html/rfc3339 NOTE: ISO 8601 defines date and time separated by "T". Applications using this syntax may choose, for the sake of readability, to specify a full-date and full-time separated by (say) a space character. Someday someone reading this is going to set out to make a new, small specification out of a huge specification. Reader, when you start to feel the temptation to make just the tiniest improvement-- resist! It's way more useful if it's actually a true subset. Happily this particular issue is be easily fixed. Let's make a new spec, subsetting both ISO 8601 and RFC 3339. I hereby introduce... RFC 3339T, which is exactly like RFC 3339, but you have to use a T instead of a space. EDIT: joshuaissac spotted another difference. Also I made a repo so we're official: https://github.com/seagreen/rfc-3339T https://github.com/seagreen/rfc-3339T
- joshuaissac 6y agoRFC 3339 also allows the offset -00:00 where the UTC time is known but the local time is not. The ISO standard does not permit this.
- seagreen 6y agoOoh, interesting. I made a GitHub repo for the new spec and credited you (https://github.com/seagreen/rfc-3339T https://github.com/seagreen/rfc-3339T). Let me know if you have more suggestions!
- fanf2 6y ago-00:00 is permitted by ISO 8601 but it implies that the local time is the same as UTC, it does not imply that the local time is unknown.
- seagreen 6y agoIs Wikipedia wrong? It claims (https://en.wikipedia.org/wiki/ISO_8601 https://en.wikipedia.org/wiki/ISO_8601): An offset of zero, in addition to having the special representation "Z", can also be stated numerically as "+00:00", "+0000", or "+00". However, it is not permitted to state it numerically with a negative sign, as "−00:00", "−0000", or "−00"." Sure would be nice if we could read the spec online:)
- remram 6y agoFrom yesterday: "ISO obstructs adoption of standards by paywalling them" (same Twitter thread) https://news.ycombinator.com/item?id=26390040 https://news.ycombinator.com/item?id=26390040
- tosh 6y agothanks for the pointer, I missed the discussion!
- eyelidlessness 6y agoThe first reply that showed up for me just said “that’s dumb”, and well, yup that about sums it up.
- TeMPOraL 6y agoYeah, and that reply is from CEO of Epic Games. I don't know if this holds any weight with ISO, but it at least explains why this particular Twitter thread complaining about access to ISO-8601 standard is hitting HN frontpage. And he raises a good point downthread, too: "So, what's the calculus with something like the ISO C++ standard? You sell 1000 copies at $200 = $200,000 lifetime income. Meanwhile, a lack of understanding of C++ details is kneecapping a hundred billion dollar segment of the technology industry. It's absolute madness."
- kps 6y agoFor C++ there's no practical problem, since the C++ committee chooses to make the I-can't-believe-it's-not-ISO ‘final draft’ public.
- scaladev 6y agoFrom what I've heard most compiler developers base their work off those final drafts, so you'd be better off using them anyway. Might be an old wives' tale though.
- aidenn0 6y agoI work at a compilers company and my manager has told us to not work off the drafts and to expense the standard if we lack a copy. I suspect volunteers working on floss compilers use the draft, but anyone who can expense it has no reason not to. As an aside, when I need to explain how something works for C, I quote the standard. When I need to explain how something works for C++, I quote Stroustrup's book. The C++ standard is very precise, but also very math-y. Stroustrup is much more approachable.
- chrismeller 6y agoWell I knew this, but it shouldn’t surprise most of the people here either. How many factories, data centers, companies, and products have you seen that are ISO-something certified? It’s an entire industry, of course part of that process is paying to get the specification that you’re already paying for someone to verify you’re abiding by. The last time I went through an audit the consulting firm that was auditing us only very begrudgingly gave us the requirements for a couple of sections because we kept insisting that we were providing proof that we met them and they kept disagreeing. I still think it was just to shut us up... As they mention in the tweet, you can possibly get them from the standards body in your country. For my current country (Estonia) they don’t seem to give it out freely, but you can buy the version they approved as the country’s standard for like €20, compared with the €200 for the official ISO version. So there are options...
- rjsw 6y agoOnly a subset of standards have a certification industry around them. In your dispute with the consulting firm you were expected to buy your own copy of the standard, they don't have the rights to give you one.
- chrismeller 6y agoAgreed on both points. I’m not saying every industry has a cert industry, just like not every industry has a regulating body; just that these are predominant enough in IT and related fields that it shouldn’t be surprising to a lot of people here to realize there are a lot of them. And of course I get that we were supposed to buy our own copy. We actually had our own copy (when paying $20k for an audit the couple $100 for the spec is insignificant), it was just an anecdote I found funny. They refused to provide anything about the spec so hard, even though we kept insisting we did meet it... they wouldn’t even tell us which part specifically we didn’t meet because they didn’t want to provide any of the spec to us. I think it took the CTO and I sending heavily highlighted copies of the requirements from the spec to them for them to realize that we had it, it was ok to show us specifically what they didn’t think we met.
- thewakalix 6y ago
- coding123 6y agoThe iso standard is pretty much spec'd out enough on Wikipedia.
- kevinpet 6y agoIs it? Are you sure? Are we following the ISO standard, or the Wikipedia standard?
- chrismeller 6y agoNot to mention the fact that the Wikipedia article technically seems to violate the ISO copyright and could disappear at some point...
- ThrustVectoring 6y agoFacts cannot be copyrighted. Phrasing the description of YYYY-MM-DD strings and the like in a different way is likely sufficient to be freely available. Now, whether that's actually enough to convince the administrators to keep it up and risk the time and expense of a lawsuit is another matter entirely - in practice, anything that rightsholders threaten to sue over is probably banned, regardless of the actual legal status.
- MaxBarraclough 6y ago> Facts cannot be copyrighted. Phrasing the description of YYYY-MM-DD strings and the like in a different way is likely sufficient to be freely available. To my knowledge, wholesale 'rephrasings' of standards documents have never been undertaken, even where royalty-free access to a document is in relatively high demand, such as with the C standard. StackOverflow ends up being the substitute for the standards document. As well as being a lot of work, it would open the door to small inaccuracies. A lot of work goes into 'laywering' the exact phrasing of such documents.
- jfim 6y ago
- s_dev 6y agoIs this like having an encryption standard that you have to buy to inspect? Is this analogy appropriate?
- hwbehrens 6y agoIt's not an analogy -- ISO/IEC 18033-3 [0] is literally an encryption standard that you have to buy to inspect. [0]: https://www.iso.org/standard/37972.html https://www.iso.org/standard/37972.html
- rdpintqogeogsaa 6y agoThere's more. ISO/IEC 29192-1 through 29192-7 are standards on lightweight cryptography that you have to buy to inspect. Total cost for all of them including the one amendment is CHF 812.
- Shank 6y agoYou have to buy the ISO 27001 standard, which is a security standard: “ISO/IEC 27001:2013 specifies the requirements for establishing, implementing, maintaining and continually improving an information security management system within the context of the organization. It also includes requirements for the assessment and treatment of information security risks tailored to the needs of the organization.”
- s_dev 6y agoSo is this standard considered 'free' and 'open'?
- chrismeller 6y agoAbsolutely not. None of the ISO standards would meet either of those criteria.
- arthur2e5 6y agoNah, the term "open standard" is so vague that is probably does. In its laxest definition -- endorsed by ISO itself -- it's just a standard managed by a nonprofit standard organization. In the more common definition it only requires royalty-free use plus the org. Requiring free access is unfortunately an extreme in the spectrum of definitions.
- numpad0 6y agoIt’s the same situation as research journal contracts. Universities, major engineering firms, some federal agencies are expected to give input to standards body, and then buy the complete print book set for use. That’s how almost every industrial industries worked, up to the point when software engineering started to exist.
- vendiddy 6y agoIf someone were to release an open source reference implementation with s thorough test suite, would that be able to work around the lack of a spec? And beyond that, are there any loopholes to workaround the need to pay for a spec?
- brlcad 6y agoNIST does this on the regular with ISO standards that they're involved with. That said, having a reference implementation with a test suite doesn't work around anything. Someone needs to have access to the standard to create the reference implementation. Not really a "loophole" but those on the committee that develops a given standard typically have free access to draft versions, often even the final version ratified by ISO.
- rjsw 6y agoPeople on a commitee have free access to the final versions of anything that might be helpful to develop future standards. I'm guessing from your username which standards you are interested in.
- cogwheel 6y agoThe same is true for the standard that sets A to 440 Hz. Though they spoil the plot in the abstract. https://www.iso.org/standard/3601.html https://www.iso.org/standard/3601.html
- wincy 6y agoOnly 38 Swiss Francs (~40USD, ~35EUR) to review this standard! So if I want to make an ISO standard instrument do I need to buy all the other notes too?
- anticristi 6y agoOnly if you don't know how to multiply and divide frequencies by 2^(1/12).
- cogwheel 6y agono, you just need to multiply 440 by (12th root of 2)^k, where k is the number of half-tones above (pos) or below (neg) A440
- matheusmoreira 6y agoHuh, so this is where musical notes come from? I thought they had always been like that, never expected to find some ISO standard behind it all.
- Jap2-0 6y agoPutting aside that notes don't really have to be in tune to be notes, this is not where A=440hz originated. Correction: upon further research, this is where 440hz originated. However, it was not the original standard (or where musical notes come from), and I find the history interesting, so I'm going to post it anyway. Tuning used to be based off of whatever instrument was not easily tunable (the piano or organ), or some other instrument (oboe?) if there was none. For much of musical history tuning was significantly lower than A=440, albeit with a lot more variation; however, it tended to rise[0][1] in order to create a more brilliant-sounding timbre (particularly in larger venues), especially among instrumental pieces. This led to some contention, especially with vocalists who found the increasingly-high notes more and more difficult to sing. There were several efforts to readjust tuning to something more reasonable, but ultimately none of them worked for long. Frequency was actually orignically standardized in Article 282, section 22 of the Treaty of Versailles.[2] This may not make a lot of sense at initial glance, but when thinking about it as how good orchestras sound, it does make some sense as an economic policy This is where I originally messed up, though. The Treaty of Versailles references something else (which I don't have a link for), but which, per [1], standardizes to... 435hz. But again this crept up, and apparently the US and UK did some shenanigans with interpreting it (the UK changed the temperature to get it to 439hz, I haven't found out precisely what the US did), and there was again some debate. Some people gave up and standardized with the UK to 440hz, some stayed at 435, and eventually the ISO did step in and standardized again on 440. So we may all be breaking international law by tuning to 440hz. [0] https://en.wikipedia.org/wiki/Concert_pitch#Pitch_inflation https://en.wikipedia.org/wiki/Concert_pitch#Pitch_inflation [1] https://www.youtube.com/watch?v=BzznBt8tVnI https://www.youtube.com/watch?v=BzznBt8tVnI [2] https://en.wikisource.org/wiki/Treaty_of_Versailles/Part_X#Article_282 https://en.wikisource.org/wiki/Treaty_of_Versailles/Part_X#A...
- HDMI_Cable 6y agoI know that the ISO has to make money for their operations, but fully locking standards behind paywalls seems so inefficient. There are plenty of other business models to choose from besides a full lock and key.
- JdeBP 6y agoIt's not freely available, i.e. at zero cost. This is not the same as not publicly available, which it definitely is. See https://news.ycombinator.com/item?id=26279292 https://news.ycombinator.com/item?id=26279292 . This has been misrepresented both in the headline here, and by some commenters both here and on Twitter. The original Twitter post clearly talked about economic value and downloading copies for free, not about hiding things from the public. Notions of economic value and charging the highest price that the market can bear are a very different discussion to not publicly available.
- anticristi 6y agoHonestly, I don't get why people are complaining. An ISO standard costs fraction of what the developer's time reading said standard costs. It's almost like complaining that electricity and laptops are not free. I would much rather like to hear if the value that ISO produces is proportional to what they charge. Also, are the incentives properly aligned by charging a fee?
- andyana 6y ago> An ISO standard costs fraction of what the developer's time reading said standard costs. Well, what if I'm tinkering in my spare time? I think if you want people to use a standard like this, you shouldn't charge for access to said standard. Or you can, but stuff like this comes up. Seems petty to me. There are lots of people out there that don't have money for this, and I can't think of any positives around that.
- anaganisk 6y agoSo show track location, cookies and show ads instead?
- anticristi 6y ago... only to find out later it was a click-bait that had zero information.
- m-p-3 6y agoI guess we'll eventually see IsoHub as a branch of SciHub?
- arthur2e5 6y agoLibrary genesis has a standards section, although for some reason it's spelled "standards". And it's not that standard-rich. For now Google seems to do the standard-pirating job better, partly because it indexes Baidu's Wenku ;)
- colejohnson66 6y agoA quick look shows libgen saying “standards” (the correct spelling) in multiple places. The URL, OTOH, says “standarts” (note the “t”)
- boshomi 6y agoIsoHub.org belongs to Cuba. StandardsHub.org is occupied by ISO
- agul29 6y agoIEC, ISO and BS standards compilations are are all over the torrent sites.
- em500 6y agoThere's a free draft version from the Library of Congress: https://www.loc.gov/standards/datetime/iso-tc154-wg5_n0038_iso_wd_8601-1_2016-02-16.pdf https://www.loc.gov/standards/datetime/iso-tc154-wg5_n0038_i... https://www.loc.gov/standards/datetime/iso-tc154-wg5_n0039_iso_wd_8601-2_2016-02-16.pdf https://www.loc.gov/standards/datetime/iso-tc154-wg5_n0039_i... Do take note of the caveats on the cover. (Not suggesting that relying on the free draft is great, just providing a reference for people interested in the actual content of ISO 8601, rather than the principles around this issue. The spec is a good read for people interested in datetime representations.)
- fanf2 6y agoI believe there were changes between that draft and the standard, e.g. removal of the 24:00 end-of-day designation.
- cobaltoxide 6y agoI suspect that, typically, when people mention ISO-8601, they really mean simply "YYYY-MM-DD" and are not seeking to incorporate all the other complications and details of the standard.
- mro_name 6y agowell, they are referring to a subset then and should call it such. Maybe there's a name for it - rfc3339?
- dharmab 6y agoThat's how the ISO standards body works- you pay access for the spec to fund the ISO's development of standards. https://www.youtube.com/watch?v=nAsrsMPftOI https://www.youtube.com/watch?v=nAsrsMPftOI
- fanf2 6y agoAs I understand it, committee members also have to pay to contribute to ISO standards development.
- flowerlad 6y agoI ran into this when I need to write an HTML parser. The W3 spec references SGML and the spec for that is not freely [1] available: https://www.iso.org/standard/16387.html https://www.iso.org/standard/16387.html [1] free as in beer
- taylodl 6y agoSo? I'd be happy if people would consistently use RFC 3339 (https://tools.ietf.org/html/rfc3339 https://tools.ietf.org/html/rfc3339). This will solve 99.999% you're going to run across. If you're part of that 0.001% who actually needs the standard - then it will be worth a few bucks to obtain it.
- Macha 6y agoYeah, there's enough software that only understands ISO-8601 to be YYYY-MM-DDThh:mm:ss (with optional Z or +/-xx:xx for a offset datetime), that I wouldn't rely on anything more niche from the spec. That does include the period definition format, which I know will disappoint some people.
- taylodl 6y ago> period definition format You mean the milliseconds? You're correct that YMMV with regards to libraries, but a lot of them handle milliseconds as well.
- Macha 6y agoNo, I mean stuff like 2007-03-01T13:00:00Z/P1M For something that occurs on the first of each month.
- taylodl 6y agoOh - combining a date/timestamp and a duration, such as xsd:duration (http://www.datypic.com/sc/xsd/t-xsd_duration.html http://www.datypic.com/sc/xsd/t-xsd_duration.html). I've never seen them combined into a single string, though there have been times when that would have been really useful!
- em500 6y agoIt looks like xsd:duration uses duration notation from ISO8601. The rules for combining them or designating recurring intervals are in ISO8601 section 4.4-4.5 [1]. Unfortunately, awareness and library support for ISO8601 interval notation are very sparse and most people/orgs just roll their own. [1] https://www.loc.gov/standards/datetime/iso-tc154-wg5_n0038_iso_wd_8601-1_2016-02-16.pdf https://www.loc.gov/standards/datetime/iso-tc154-wg5_n0038_i...
- deleted 6y ago[deleted]
- robocat 6y agoIt looks to me that about half the revenue for the organisation comes from selling ISO standards. 2019 revenue of ISO - figures in ‘000s of CHF (edit 1CHF = 1.08USD) - details from page 63 of https://www.iso.org/files/live/sites/isoorg/files/store/en/PUB100385.pdf https://www.iso.org/files/live/sites/isoorg/files/store/en/P... 21181 Membership fees 12924 *Royalties received from members selling ISO standards* 6592 *Revenue – net sales* 2286 Funding of capacity building projects 273 Funding of ISO strategic projects (99) Financial revenue (loss) ===== 43157 TOTAL REVENUE Ideally standards should be free, but how the organisation could survive on only half its current revenues would need to be addressed. Edit: removed subtotal rows “34105 Revenue from members”, “2559 Funding of ISO projects”
- javajosh 6y agoVery nice, thanks. $43M of revenue is a lot more than I expected. I wonder what they spend it on?
- speedgoose 6y agoThey are based in Geneva, so 43 millions should be just enough for 3 young employees in a basement and an internet connection. More seriously, they spend almost everything on operations. It doesn't seem that much to me, good employees are very costly.
- danbruc 6y agoSo ISO has 165 member countries, if each one would pays 80k per year more than the current membership fee, that would cover the lost revenue from sales. That seems almost like a rounding error to me.
- JdeBP 6y agoYou need to think it through further. Where do the member bodies get this money from? No, they aren't all taxpayer funded. In some countries they are entirely private organizations. ANSI is a non-profit private company, for example. And the ones that are are taxpayer funded are not necessarily wholly so. The BSI gets grants from the U.K. government, for example, but is far from wholly funded by it. Standards Australia made just under AUD7 millions in 2017 (for example) from selling copies of standards, via subcontractor publisher SAI. This was just under a quarter of its total revenue for the year. Nearly all that would be gone were ISO to start giving away copies for free, and yet SA would be expected to pay an extra AUD0.1 million in ISO fees at the same time. * https://www.standards.org.au/about/governance/annual-reviews https://www.standards.org.au/about/governance/annual-reviews So what's your proposal for making up for this lost revenue stream as well as paying higher ISO fees? Across all of those 165 countries.
- hbrav 6y agoIsn't this going to hamper companies in poorer countries from adopting these standards?
- fireeyed 6y agoThe people running ISO and other “commercial standards” are in it for the grift. If they make the standards free their gravy train runs out.
- cies 6y agoJust judging from what I read iso8601 is based off of rfc3339 (as i assume the "request for comments" phase is before the iso standardization). ISO slightly improved the rfc, but it is largely the same. "Internet RFCs" (if thats the right word for the phenomenon) are free, that's the whole point. ISO has taken the free (as in speech) and is now selling a derivative work. I think we need to call Stallman on this one. We need Copyleft licenses on our standards to prevent this kind of corporate freeloading. ISO just sunk in my esteem, silly dinosaurs. I hope they get replaced by something that makes more sense.
- chrisseaton 6y ago> Just judging from what I read iso8601 is based off of rfc3339 (as i assume the "request for comments" phase is before the iso standardization). No that's not how this works. The ISO one is from the 80s, the IETF one from the 2000s. It's the other way around. The RFC is a profile of the ISO. > ISO slightly improved the rfc, but it is largely the same. This is not a true statement. > ISO has taken the free (as in speech) and is now selling a derivative work. This is also not a true statement.
- superjan 6y agoAs far as the ISO is concerned, IT business is just one of many businesses for which they manage the standards process. ISO has to pay the bills somehow, don’t they? If they would not charge the users of the standards the bill would go to governments (effectively taxpayers). As far as taxpayers are concerned, if the industry needs standards, they should pay for them themselves. There is merit to the argument that free standards stimulate innovation, but if governments subsidize the industry, they will prefer to subsidize their national industry, not world wide.
- michaeltimo 6y agoMaybe it's the time to think about an open alternative to ISO like OpenISO or something.
- ademarre 6y agoI would not have my current career if not for the information freely available online. The most useful knowledge I've acquired about building things on the internet came not from framework/library/API docs, but from RFCs published by the IETF. Industries that are more reliant on non-free standards are surely worse off because of it.
- An_ISO_Dude 6y agoAre we just going to keep posting articles about ISO publications not being freely available? It's publicly available but is not free. There is nothing to discuss here and this is not newsworthy.
- AnimalMuppet 6y agoYou know, it's really easy to skip over an article you don't care about, and move on to one that you do. But given your user name, and your other comments, I'm pretty sure you mean something else. You want us to stop discussing it, because you don't like us ripping on your organization. Well, you can stop discussing it any time. The rest of us will discuss it as long as it interests us, as often as enough of us find it interesting.
- p1mrx 6y agoLet's all use YYYY-DD-MM until they free the standard.