C# 클래스 NContrib.Extensions.DateTimeExtensions

파일 보기 프로젝트 열기: veracross/ncontrib

공개 프로퍼티들

프로퍼티 타입 설명
UnixEpoch System.DateTime

공개 메소드들

메소드 설명
ToBeatTime ( this dt ) : double

Converts a timestamp to Swatch Internet Time (beat time)

ToDateTime ( this unixTimestamp ) : System.DateTime

Converts a UNIX timestamp to a DateTime object

ToTimeZone ( this dt, string timeZoneId ) : System.DateTime

Converts a UTC DateTime to a DateTime in the specified timeZoneId

Use TimeZoneInfo.GetSystemTimeZones() to view available TimeZoneIds Or look in HKLM\Software\Microsoft\Windows NT\CurrentVersion\Time Zones\

ToTimeZone ( this dt, string fromTimeZoneId, string toTimeZoneId ) : System.DateTime

Converts a DateTime from one time zone to another

Use TimeZoneInfo.GetSystemTimeZones() to view available TimeZoneIds Or look in HKLM\Software\Microsoft\Windows NT\CurrentVersion\Time Zones\

ToUniversalTime ( this dt, string timeZoneId ) : System.DateTime

Converts an offset DateTime in the specified timeZoneId to a UTC DateTime

Use TimeZoneInfo.GetSystemTimeZones() to view available TimeZoneIds Or look in HKLM\Software\Microsoft\Windows NT\CurrentVersion\Time Zones\

ToUnixTime ( this dt ) : long

Converts the given DateTime to a UNIX timestamp

메소드 상세

ToBeatTime() 공개 정적인 메소드

Converts a timestamp to Swatch Internet Time (beat time)
public static ToBeatTime ( this dt ) : double
dt this
리턴 double

ToDateTime() 공개 정적인 메소드

Converts a UNIX timestamp to a DateTime object
public static ToDateTime ( this unixTimestamp ) : System.DateTime
unixTimestamp this
리턴 System.DateTime

ToTimeZone() 공개 정적인 메소드

Converts a UTC DateTime to a DateTime in the specified timeZoneId
Use TimeZoneInfo.GetSystemTimeZones() to view available TimeZoneIds Or look in HKLM\Software\Microsoft\Windows NT\CurrentVersion\Time Zones\
public static ToTimeZone ( this dt, string timeZoneId ) : System.DateTime
dt this
timeZoneId string Time zone to convert to
리턴 System.DateTime

ToTimeZone() 공개 정적인 메소드

Converts a DateTime from one time zone to another
Use TimeZoneInfo.GetSystemTimeZones() to view available TimeZoneIds Or look in HKLM\Software\Microsoft\Windows NT\CurrentVersion\Time Zones\
public static ToTimeZone ( this dt, string fromTimeZoneId, string toTimeZoneId ) : System.DateTime
dt this
fromTimeZoneId string Time zone to convert from
toTimeZoneId string
리턴 System.DateTime

ToUniversalTime() 공개 정적인 메소드

Converts an offset DateTime in the specified timeZoneId to a UTC DateTime
Use TimeZoneInfo.GetSystemTimeZones() to view available TimeZoneIds Or look in HKLM\Software\Microsoft\Windows NT\CurrentVersion\Time Zones\
public static ToUniversalTime ( this dt, string timeZoneId ) : System.DateTime
dt this
timeZoneId string Time zone to convert from
리턴 System.DateTime

ToUnixTime() 공개 정적인 메소드

Converts the given DateTime to a UNIX timestamp
public static ToUnixTime ( this dt ) : long
dt this
리턴 long

프로퍼티 상세

UnixEpoch 공개적으로 정적으로 프로퍼티

public static DateTime,System UnixEpoch
리턴 System.DateTime