문제

I am working in MVC4 project .In this project i need to convert UTC time ,which i am getting from server to brazil time zone.

How can i convert UTC time to brazil time in noda time library.

도움이 되었습니까?

해결책

Fundamentally, if you can get the value as an Instant to start with, it's as simple as:

var instant = ...; // However you're receiving that
var zone = DateTimeZoneProviders.Tzdb["America/Sao_Paulo"];
var inBrazil = instant.InZone(zone);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top