News for hackers. Stuff that matters.
Re:RFC 3339 vs. ISO 8601 by pletnes on Sunday October 24, 2021 @07:01AM (#28976725)
The use of colon in timestamps is incompatible with several filesystems and this just drives me nuts.
Re:RFC 3339 vs. ISO 8601 by LinAGKar on Sunday October 24, 2021 @07:43AM (#28977016)
By "several filesystems", you mean Windows? NTFS can handle it, but Windows can't (presumably due to using it for drive letters).
Re:RFC 3339 vs. ISO 8601 by boondaburrah on Sunday October 24, 2021 @08:10AM (#28977172)
':' was the traditional directory separator on Macintosh systems before OSX, therefore it can't be used on HFS+ either. I remember there being some FS funk when OSX came out since it was very common for people to put dates in their filenames using slashes, and well, UNIX doesn't like that. I don't know what APFS does.
Re:RFC 3339 vs. ISO 8601 by fanf2 on Sunday October 24, 2021 @08:47AM (#28977403)
As I understand it, : and / get swapped depending on whether you use unix APIs (/ is a directory separator, : is plain) or mac APIs (: is a directory separator and / is plain)
Re:RFC 3339 vs. ISO 8601 by pletnes on Sunday October 24, 2021 @01:21PM (#28979986)
From what I recall (had a macbook years ago) I could put colons in filenames in the terminal, but not in finder.
Re:RFC 3339 vs. ISO 8601 by rogerbinns on Sunday October 24, 2021 @10:55AM (#28978475)
NTFS can't have colons in filenames because they are used to name alternate data streams.

https://docs.microsoft.com/en-us/sysinternals/downloads/stre...

Re:RFC 3339 vs. ISO 8601 by erik_seaberg on Sunday October 24, 2021 @07:49PM (#28983043)
Also HDFS. This bit me the first time I tried to write a Hadoop job that wrote every run to a new output dir.
Re:RFC 3339 vs. ISO 8601 by Dunedan on Sunday October 24, 2021 @02:28PM (#28980634)
Fun fact: If you download a file containing colons with popular web browsers, they'll try to be helpful and will replace the colons to avoid problems storing the file on filesystems which don't support colons. Took me a while to figure out why the browsers messed with the file names.
Re:RFC 3339 vs. ISO 8601 by uwu on Sunday October 24, 2021 @04:24PM (#28981533)
chrome's extension api for downloads has the same limitation

filenames that are reserved names on windows (like NUL) or contain characters that are reserved on windows are refused with "Invalid filename", even on platforms and filesystems that don't have the same limitations

this might be desirable for enforcing portability in extensions, but the thing isn't mentioned in the documentation[1] for the api so you had to know about it beforehand (like most extension devs, probably) or find out the hard way when some of your downloads unexpectedly fail (like me)

i was using it on linux in a personal extension i wrote, and i thought it was silly that i had to add extra code to further sanitize and mangle the filenames for an OS i don't even use

[1] https://developer.chrome.com/docs/extensions/reference/downl...

Re:RFC 3339 vs. ISO 8601 by kortex on Sunday October 24, 2021 @10:50AM (#28978425)
I use 2021-10-24T10_45_32_123456. Never had to store non-UTC so I'm not sure how I'd notate that. I don't use dots for fractional seconds because while that shouldn't get interpreted as an extension, some systems still do.
Re:RFC 3339 vs. ISO 8601 by dvh on Sunday October 24, 2021 @07:08AM (#28976777)
Me too, I'm usually using 2021-10-24--13-07-59
Re:RFC 3339 vs. ISO 8601 by jacobmischka on Sunday October 24, 2021 @07:24AM (#28976891)
I use `--` to represent an en dash for date ranges (some_report_2021-01-01--2021-12-31). I don't use times nearly as often, but I separate date from time using an underscore in those instances.
Re:RFC 3339 vs. ISO 8601 by Springtime on Sunday October 24, 2021 @09:03PM (#28983474)
My workaround has been to use alternate Unicode for colons[1] in filenames in Windows, along with similar substitutes for other illegal characters. For ease of input I use Autohotkey bindings (in this example: Alt+colon).

[1] '꞉' (U+A789). On my Windows systems the default typeface renders this identically to a regular colon.

Re:RFC 3339 vs. ISO 8601 by ketzu on Sunday October 24, 2021 @11:40AM (#28978935)
I just wish there was proper support and UX for dates on file systems, so I can actually properly search for date ranges instead of having "iso8601 sorts lexicographically!" as a crutch used within filenames.
Re:RFC 3339 vs. ISO 8601 by yeetaccount on Sunday October 24, 2021 @12:08PM (#28979207)
It doesn’t take long to get used to the basic format. 20211024T090755, etc.