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
  • 9,921
  • 3
  • 25
  • 45
Chaluvaraju Ps
  • 37
  • 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
  • 16,885
  • 12
  • 74
  • 152