18 digit timestamp?

后端 未结 3 1398
不思量自难忘°
不思量自难忘° 2020-12-19 11:10

I am working on a system related to tv recordings.

I am parsing the following xml from another system (to which i have no documentation):



        
3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-19 11:32

    It looks like C#'s DateTime ticks:

    The DateTime value type represents dates and times with values ranging from 12:00:00 midnight, January 1, 0001 Anno Domini (Common Era) through 11:59:59 P.M., December 31, 9999 A.D. (C.E.)

    This line:

    Console.WriteLine (new DateTime (633936042047633656));
    

    prints:

    11/12/2009 6:30:04 AM

    If you need to convert from those numbers to Unix time, substract 621355968000000000L, which is the Unix epoch expressed in ticks.

提交回复
热议问题