1
2
3
4
5
6
7
8
9
10
11
12
13
14
    public static DateTime JavaToCSharpUTC(long javaLong)
    {
        DateTime Jan1st1970 = new DateTime(197011000, DateTimeKind.Utc);
        DateTime result = Jan1st1970.AddMilliseconds(javaLong).ToUniversalTime();
 
        return result;
    }
 
    public static long CSharpToJavaUTC(long ticks)
    {
        DateTime Jan1st1970 = new DateTime(197011000, DateTimeKind.Utc);
 
        return ticks - Jan1st1970.Ticks;
    }
cs



'02.Development > C#' 카테고리의 다른 글

[C#] 숫자 문자열에 컴마(,) 찍기  (0) 2016.02.12
[C#] List, Array 셔플  (0) 2016.02.04

+ Recent posts