There is no such thing as "Italian time". Time is always
. If you need to present it in Italian, it's not time, this is string, which has nothing to do with time.
However, if you mean Italian time zone, you need to use the time zone class
, please see:
[EDIT] I credit the answer by André Kraak who correctly explained it [END EDIT]
If you need a string, keep reading:
You need to use
to take into account Italian culture. You need to use the instance of
as it implements
. Please see the code sample here:
Of course, put appropriate culture ("it-IT") code instead of "ja-JP".
Added another method and Italian culture code in the previous two paragraphs, to make it more clear.
You can find a list of culture codes in many documents, for example, here:
For format specifiers, please see:
A format specifier can be used with
or without it; and
can be used with or without format specifier.
Suppose you need a date-time string in Italian:
System.DateTime time = System.DateTime.Now;
System.IFormatProvider culture = new System.Globalization.CultureInfo("it-IT"); string defaultTimeString = time.ToString(culture);
string fullDateTimePatternShortTime = time.ToString("f", culture);
string fullDateTimePatternLongTime = time.ToString("F", culture);
string fullDayMonthYearOnly = time.ToString("dd MMMM yyyy", culture);