C# 클래스 Rock.RockDateTime

Special Class that returns current Current DateTime based on the TimeZone set in Web.Config This is done because the system may be hosted in a different timezone than the organization Rock developers should use RockDateTime.Now instead of DateTime.Now
파일 보기 프로젝트 열기: NewSpring/Rock 1 사용 예제들

공개 메소드들

메소드 설명
ConvertLocalDateTimeToRockDateTime ( System.DateTime localDateTime ) : System.DateTime

Converts the local date time to rock date time. Use this to convert a local datetime (for example, the datetime of a file stored on the server) to the Rock OrgTimeZone

New ( int year, int month, int day ) : DateTime?

Creates a new datetime based on year, month, day, and handles 2/29 for non leap years (returns 2/28 in this case)

메소드 상세

ConvertLocalDateTimeToRockDateTime() 공개 정적인 메소드

Converts the local date time to rock date time. Use this to convert a local datetime (for example, the datetime of a file stored on the server) to the Rock OrgTimeZone
public static ConvertLocalDateTimeToRockDateTime ( System.DateTime localDateTime ) : System.DateTime
localDateTime System.DateTime The local date time.
리턴 System.DateTime

New() 공개 정적인 메소드

Creates a new datetime based on year, month, day, and handles 2/29 for non leap years (returns 2/28 in this case)
public static New ( int year, int month, int day ) : DateTime?
year int The year.
month int The month.
day int The day.
리턴 DateTime?