HI WELCOME TO KANSIRIS

Get current date time from server and convert it into local time in c#

Leave a Comment

 

DateTime utcTime = DateTime.UtcNow;
TimeZoneInfo tzi = TimeZoneInfo.FindSystemTimeZoneById(“India Standard Time”);
DateTime localTime = TimeZoneInfo.ConvertTimeFromUtc(utcTime, tzi);

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.