Say my time zone in the system right now is + 5GMT
right now on my machine 01/14/2012 05:52PM I want to convert it to PST timezone, for example
01/14/2012 05:52PM
1/14/12 4:52:50 AM PST
and vice versa PST to GMT
TimeZoneInfo timeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById("Pacific SA Standard Time"); DateTime newDateTime = TimeZoneInfo.ConvertTime(existingDateTime, timeZoneInfo);
You can see the full schedule of available time zones here.
Also see Convert between any two time zones.
Below convert the code to PST.
TimeZoneInfo timeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time");
Source: https://habr.com/ru/post/905966/More articles:Why does Python seem to treat instance variables as shared between objects? - pythonSpecial fonts in TCPDF pdf - phpLighting the main unit - what is the exact definition? - unit-testinghttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/905964/what-are-some-alternatives-to-playn&usg=ALkJrhgBXmxkEdvuuBdjyQruc7oLUpWAMQOrientDB: Find all vertices that do not have a direct neighboring vertex of a given class - graph-databasesIncluding QR scanner application with PhoneGap - androidChange the value of the static resource wpf - c #DateTime as an optional parameter (default is "now", not null)? - phpQR code to run your own application - androidINSERT multiple rows and source (source) OUTPUT values ββ- sqlAll Articles