User88744855 posted
i heard that if i use nodatime library then i can get date & time based on timezone id. first i change my pc date and time. set to old date and time in my pc and then run the below code which disappoint me.
using NodaTime;
var zoneId = "Asia/Kolkata";
DateTimeZone _zone = DateTimeZoneProviders.Tzdb[zoneId];
ZonedDateTime _now = SystemClock.Instance.Now.InZone(_zone);
var xx = _now.LocalDateTime;
below code display wrong date & time because i set my pc date & time to few days back.
is there any way that if date & time is wrong but still code display right date & time without depending on user pc date & time setting using Noda Time library. looking for suggestion. thanks