Reputation: 73
How to get a UTC hour for the local time. For example, local time in Asia/Kolkata is 14:00:00 how to get the corresponding starting UTC hour 08:0:0(actual value is 8:30:00)? .im searching a global solution for all timezone.
Upvotes: 0
Views: 388
Reputation: 23228
dateTime.ToUniversalTime().Hour
method will help you
Here you find the corresponding documentation: System.Datetime.ToUniversalTime()
Upvotes: 1