Whaly's World tail -f /var/log/whaly

9Aug/092

The time separator

DateTime.Now.ToString("HH:mm:ss");

is a common mystake if you want to transmit to someone or to be sure that you have something like "HH:mm:ss" because the character (:) is not just a colon, it's a time separator wich depend on the locale.

Here is a list of culture where the (:) change into a dot (.)
it-IT : Italian (Italy)
fo-FO : Faroese (Faroe Islands)
bn-BD : Bengali (Bangladesh)
ml-IN : Malayalam (India)
bn-IN : Bengali (India)

To workaround you can use CultureInfo.InvariantCulture or escape the colon character.

... and same story for the date separator "/" but this one is at this time the same for every culture.

Tagged as: , , 2 Comments