vct
vct

Reputation: 73

Get the corresponding starting local hour in utc c#

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

Answers (1)

Pavel Anikhouski
Pavel Anikhouski

Reputation: 23228

dateTime.ToUniversalTime().Hour method will help you

Here you find the corresponding documentation: System.Datetime.ToUniversalTime()

Upvotes: 1

Related Questions