C# Class H.Comm.TimeUtility

关于时间的一些方法 added by zbw911
Datei anzeigen Open project: zbw911/CS4Hadoop

Public Methods

Method Description
DateTimeToJavaTimeStamp ( System.DateTime datetime ) : long

生成java版本的 timestamp

DescTimeStamp ( System.DateTime datetime ) : long

生成用于降序的key long.max = 9223372036854775807, 这个在java 运算过程中要注意的问题,还要,java的 long 与C# long的maxvalue是一样的

DescTimeStampToTime ( long descstamp ) : System.DateTime

降序stamp对应的值

JavaTimeStampToDateTime ( long timeStamp ) : System.DateTime

java timestamp to datetime

Private Methods

Method Description
t ( ) : void

@test

Method Details

DateTimeToJavaTimeStamp() public static method

生成java版本的 timestamp
public static DateTimeToJavaTimeStamp ( System.DateTime datetime ) : long
datetime System.DateTime
return long

DescTimeStamp() public static method

生成用于降序的key long.max = 9223372036854775807, 这个在java 运算过程中要注意的问题,还要,java的 long 与C# long的maxvalue是一样的
public static DescTimeStamp ( System.DateTime datetime ) : long
datetime System.DateTime
return long

DescTimeStampToTime() public static method

降序stamp对应的值
public static DescTimeStampToTime ( long descstamp ) : System.DateTime
descstamp long
return System.DateTime

JavaTimeStampToDateTime() public static method

java timestamp to datetime
public static JavaTimeStampToDateTime ( long timeStamp ) : System.DateTime
timeStamp long
return System.DateTime