4 ms·
It also included a serial number following the date part of 001 (also 002, etc)
by cnorthwood 5y ago
It also included a serial number following the date part of 001 (also 002, etc)
- jonny_eh 5y agoClearly this should stay a string. But I suspect they’re converting to an int to compare which definition is newer.
- turminal 5y agoThat would work just fine with a string comparison.
- priansh 5y agoYeah my first thought was, well you could lay out the timestamp in a way that supports lexicographical sorting, and then realized they had already done so. No reason this shouldn’t be a string!
- petee 5y agoIt can be both. DNS serial numbers are YYYYMMDDnn, and it works just fine for humans, it is easy to convert, more compact, and you can compare in a single operation. Internally, there is no reason for it to be a string.
- genocidicbunny 5y agoComparing with strings ain't no panacea either. There's some suspicion that Windows 9 was skipped because a lot of old software checked for Windows 95 or 98 by just doing a string compare against "Windows 9". (For the record, I kind of doubt this was much of a concern by the time Windows '9' was being worked on, but there's a certain logic to it.)
- mark-r 5y agoI think the point is that a 3 digit serial wouldn't be enough to cause overflow, it would need to be 4 digits. But who makes a post like that without using copy/paste to get it exactly right?