| 107 | #if defined(WIN32) || defined(_WIN32) |
| 108 | |
| 109 | DWORD FileTimeToTimet(LPFILETIME pft) |
| 110 | { |
| 111 | DWORDLONG dwlTime = *(PDWORDLONG)pft; |
| 112 | |
| 113 | if ((DWORDLONG)116444736000000000 < dwlTime) |
| 114 | { |
| 115 | // convert 100-nanoseconds since January 1, 1601 to |
| 116 | // seconds since January 1, 1970 |
| 117 | |
| 118 | dwlTime -= (DWORDLONG)116444736000000000; |
| 119 | dwlTime /= 10000000; |
| 120 | } |
| 121 | else |
| 122 | { |
| 123 | // Seems we have a date before January 1, 1970, just |
| 124 | // return January 1, 1970 |
| 125 | |
| 126 | dwlTime = 0; |
| 127 | } |
| 128 | |
| 129 | return (DWORD)dwlTime; |
| 130 | } |
| 131 | |
| 132 | |
| 133 | // return day of the year 1 to 366 |
no outgoing calls
no test coverage detected