Sounds right. It's worth noting that : in filenames is bad karma [no matter what the standards may say], so I always store the time packed without separators.
Basically to comply with the 'full' ISO format you need to:
- Use 4-digit years when storing or printing dates.
- Use the order Year-Month-Day for the date, i.e. biggest first.
- Use leading zeroes on the digits 00 - 09 for the month and day numbers.
- Always put the Date BEFORE the Time.
- Use the order hours:minutes:seconds for times.
- Use the 24-hour format for times (not the 12-hour am/pm).
- Use a leading zero on hour, minute and second for digits 00 - 09 inclusive.
- Use UT time scale for dates and times if transferring data internationally.
- When printing dates and times use the '-' and ':' separators.
e.g. 1996-12-31 23:59:59 is the last second of last year.
- When storing dates you can strip off the separators and store as a 32-bit
number, an ASCII string, packed BCD or whatever you like. Sort algorithms
are much easier with this YMD format.
- Times can be treated the same way (sorted or stored), as in the discussion