.NET (3.5) formats times using dots instead of colons as TimeSeparator for it-IT culture?

后端 未结 4 725
夕颜
夕颜 2020-11-30 15:40

According to Wikipedia (and confirmed in an answer by Dario Solera), in Italy they format times using colons:

The 24-hour notation is used in writing

4条回答
  •  借酒劲吻你
    2020-11-30 16:02

    The hours/minutes separator (TimeSeparator) in Italy seems to be a ., not a :.

    You are specifically formatting for the Italian culture, so it follows that this is what will be used.

    In a DateTime format string, the : is a place holder for this separator - if the culture defines . or , or anything else as the separator, that's what will be substituted when formatting the DateTime with that culture.

提交回复
热议问题