Open Justiss50 opened 6 years ago
date is generated using the .net library's ToShortDateString() doc quote: The string returned by the ToShortDateString method is culture-sensitive. It reflects the pattern defined by the current culture's DateTimeFormatInfo object. For example, for the en-US culture, the standard short date pattern is "M/d/yyyy"; for the de-DE culture, it is "dd.MM.yyyy"; for the ja-JP culture, it is "yyyy/M/d". The specific format string on a particular computer can also be customized so that it differs from the standard short date format string.
But, '/' are converted to "-" since '/' is an invalid file name character. Can you provide specific examples of local settings vs output file name?
Hi,
Image attached :) If you need someting else, poke me on slack(@justinasp)
2018-01-17 18:11 GMT+02:00 jasonm-unity notifications@github.com:
date is generated using the .net library's ToShortDateString() doc quote: The string returned by the ToShortDateString method is culture-sensitive. It reflects the pattern defined by the current culture's DateTimeFormatInfo object. For example, for the en-US culture, the standard short date pattern is "M/d/yyyy"; for the de-DE culture, it is "dd.MM.yyyy"; for the ja-JP culture, it is "yyyy/M/d". The specific format string on a particular computer can also be customized so that it differs from the standard short date format string.
But, '/' are converted to "-" since '/' is an invalid file name character. Can you provide specific examples of local settings vs output file name?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Unity-Technologies/GenericFrameRecorder/issues/61#issuecomment-358354384, or mute the thread https://github.com/notifications/unsubscribe-auth/AgomqvbbUOQ_nhTMRpVGX8crCslLjdZrks5tLhu5gaJpZM4Rcfgb .
For a filename, I'd recommend we stick to some variant of ISO 8601 (i.e. date.ToString("yyyy'-'MM'-'dd'")
). This ensures that filenames sorts correctly in file lists. It's also locale-independent... and arguably, a file name is a bad place for locale sensitivity (it's not like it gets magically renamed when it's later copied to a computer with another locale setting).
To reproduce:
Expected: file name will have date format that is on user machine Actual: file name always has date formatted by US locale
Reproduced: 2017.1.2p4, 2017.2.1p1, 2017.3.0p2, 2018.1.0b2, 2018.2.0a1
Tested on: Windows 10, OSX 10.13