2

This code exhibits different behaviors with .NET v4.0 and v3.5 :

Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("it-IT");
var tm = DateTime.Now.ToString("yyyy-MM-ddT00:00:00");
Console.WriteLine(tm);

Result in v3.5

2016-05-25T00.00.00   // using a .

Result in v4.0

2016-05-25T00:00:00   // using a :

I cannot find any KB or breaking changes related, and i would like to know if anyone have any hints about this?

NB: DateTime.ParseExact is also impacted.

Thomas Weller
  • 49,619
  • 19
  • 114
  • 198
Sté
  • 155
  • 10

0 Answers0