C# 클래스 OpenSlx.Lib.SlxDataHelpers.TimeZoneConvert

Utility methods for converting timezones. For web users, the timezone will be stored in the HttpContext. We can retrieve it via Sage's ContextService. For Unit-Test, this can be set explicitely in the suite setup.
파일 보기 프로젝트 열기: nicocrm/OpenSlx

공개 메소드들

메소드 설명
ToLocal ( System.DateTime input ) : DateTime?

Convert the datetime (assumed to be UTC) to the user's local time zone.

ToUtc ( System.DateTime input ) : DateTime?

Convert the datetime to UTC. The input datetime will be assumed to be in the local user timezone (not necessarily the same as the server's).

비공개 메소드들

메소드 설명
GetTimeZoneContext ( ) : Sage.Platform.TimeZone

메소드 상세

ToLocal() 공개 정적인 메소드

Convert the datetime (assumed to be UTC) to the user's local time zone.
public static ToLocal ( System.DateTime input ) : DateTime?
input System.DateTime
리턴 DateTime?

ToUtc() 공개 정적인 메소드

Convert the datetime to UTC. The input datetime will be assumed to be in the local user timezone (not necessarily the same as the server's).
public static ToUtc ( System.DateTime input ) : DateTime?
input System.DateTime
리턴 DateTime?