1
Answer

how can i convert Timezone

Photo of ancy chacko

ancy chacko

10y
812
1
Hi


 i am converted server timezone to India Standard Time using below code.
but its working fine in iis and not working in cloud server....(cloud timezone is us)






DateTime serverTime = DateTime.Now;
        DateTime _localTime = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(serverTime, TimeZoneInfo.Local.Id, "India Standard Time");

      
        return _localTime;

Answers (1)