Converting to a DateTime from time_t


This code just went by an internal alias and I thought
i’d record it here.


public
static DateTime Time_T2DateTime(uint
size=2> time_t)
{
size=2>    long
win32FileTime = 10000000*(long)time_t + 116444736000000000;
class=886191715-30072003>   
return
DateTime.FromFileTimeUtc(win32FileTime);
color=#0000ff>}


 

Comments (3)

  1. bg says:

    this is probably a stupid question but how do I convert a DateTime to a time_t ?

  2. Folks may use the term "Module Timestamp" to mean both file timestamp and image header timestamp. Although

Skip to main content