| 44 | */ |
| 45 | |
| 46 | time_t /* O - UNIX time */ |
| 47 | _cups_dir_time(FILETIME ft) /* I - File time */ |
| 48 | { |
| 49 | ULONGLONG val; /* File time in 0.1 usecs */ |
| 50 | |
| 51 | |
| 52 | /* |
| 53 | * Convert file time (1/10 microseconds since Jan 1, 1601) to UNIX |
| 54 | * time (seconds since Jan 1, 1970). There are 11,644,732,800 seconds |
| 55 | * between them... |
| 56 | */ |
| 57 | |
| 58 | val = ft.dwLowDateTime + ((ULONGLONG)ft.dwHighDateTime << 32); |
| 59 | return ((time_t)(val / 10000000 - 11644732800)); |
| 60 | } |
| 61 | |
| 62 | |
| 63 | /* |