The code below used to work fine before upgrading to asp5. The method ConvertTimeFromUtc is not supported by DNX Core 5.0. Is there another proper way of achieving this?
public DateTime GmtNow() {
return TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, TimeZoneInfo.FindSystemTimeZoneById("GMT Standard Time"));
}
That method doesn't exist any more, I assume it's because the following method covers all options:
TimeZoneInfo.ConvertTime(
DateTime.UtcNow, TimeZoneInfo.FindSystemTimeZoneById("GMT Standard Time"))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With