1

I have dates stored in my database as UTC. I'd like to convert them to CST (Central Standard Time).

I've looked everywhere and I've only found ways to convert UTC time to local time. How can I convert it to a specific time zone?

Steven
  • 18,761
  • 70
  • 194
  • 296

2 Answers2

3

Maybe TimeZoneInfo.ConvertTimeFromUtc from .NET 3.5/4.0?

Ramesh Rajendran
  • 37,412
  • 45
  • 153
  • 234
aguyngueran
  • 1,301
  • 10
  • 23
3

Try this way

TimeZoneInfo.ConvertTimeBySystemTimeZoneId(DateTime.Now, "New Zealand Standard Time", "UTC")

More discussions :

How to convert DateTime in Specific timezone?

http://blog.mozilla.org/it/2012/11/16/converting-timezone-specific-times-in-mysql/

Community
  • 1
  • 1
Ramesh Rajendran
  • 37,412
  • 45
  • 153
  • 234