0

this did not work for me, "Central European Time" is not identified.

DateTime d = Convert.ToDateTime(values[1]);
TimeZoneInfo CET = TimeZoneInfo.FindSystemTimeZoneById("Central European Time");
d = TimeZoneInfo.ConvertTime(d,CET);
values[1] = String.Format("{0:dd/MM/yyyy hh:mm}", d);
phuzi
  • 12,078
  • 3
  • 26
  • 50
Chaluvaraju Ps
  • 47
  • 1
  • 1
  • 4

1 Answers1

0

Please add this code to your code.

TimeZoneInfo IST TimeZoneInfo.FindSystemTimeZoneById("India Standard Time"));
d = TimeZoneInfo.ConvertTimeToUtc(d, IST);
Vivek Nuna
  • 25,472
  • 25
  • 109
  • 197