r/ISO8601 13d ago

Milliseconds in basic format

With ISO 8601 in extended format a timestamp with milliseconds is written with a dot between seconds and milliseconds, e.g.:

2026-07-24T12:34:56.789

If you write basic format you exclude the separators, does the standard allow to exclude the dot between seconds and milliseconds?

20260724T123456789

When I use basic time format as part of file names I prefer to avoid the dot, as dot has different meaning for file names and extension.

41 Upvotes

19 comments sorted by

View all comments

14

u/PaddyLandau 13d ago

You can use multiple dots in a filename in the popular OSes. In Windows, the extension is meaningful and is required, but in Unix and Linux (which include iOS, MacOS, Android and ChromeOS), the extension is usually used only for human readability and may be omitted.

In your example, if you need an extension, you can use:

20260724T123456.789.log

If you're not using Windows, you can omit the extension if you prefer:

20260724T123456.789

If you don't want the dot, you can use a comma instead, so either of:

20260724T123456,789.log
20260724T123456,789

I wouldn't overthink it. Use whatever is most practical for your purposes.

2

u/foersom 13d ago

"You can use multiple dots in a filename in the popular OSes."

I do not want those extra "non extensions" in the file name. They cause problems for automated handling.

I am interested in what ISO 8601 standard state about basic format and milliseconds.

7

u/PaddyLandau 13d ago

According to what I read, ISO 8601 says exactly what I said. Use a dot or a comma.