Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

c# GMT time equivalent with UTC time?

Tags:

c#

.net

datetime

How can I get the GMT time in .net(c#) ... is the UTC time equivalent to the GMT time?

Thanks, Radu

like image 638
Radu D Avatar asked Nov 03 '10 13:11

Radu D


2 Answers

Yes, Universal Time, "Zulu time", and UTC are effectively modern names for Greenwich Mean Time.

like image 109
winwaed Avatar answered Oct 05 '22 13:10

winwaed


Yes, the UTC time is (for all intents and purposes) equivalent to the GMT time. You can use the DateTime.ToUniversalTime() method to get the UTC time. For example, to get the current UTC time:

DateTime.Now.ToUniversalTime()

like image 42
Donut Avatar answered Oct 05 '22 14:10

Donut