When you are hosting you application to a production server outside india, its often we need indian time so i ve created a c# method which returns indian standard time from your server wherever it is located in india...
public DateTime getIndianStandardTime()
{
TimeZoneInfo IND_ZONE=TimeZoneInfo.FindSystemTimeZoneById("India Standard Time");
return TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, IND_ZONE);}
It's working fine.Thanks.
ReplyDeletein one like also works as DateTime.UtcNow.AddHours(5.5).ToString()
ReplyDeleteIts really working fine.Thanks.
ReplyDeleteWorking 100%
ReplyDeleteVery Very Thanks
Does it Handle DayLight Saving? Not applicable for India but for other countries?
ReplyDelete