Mercurial > libpst
comparison src/timeconv.c @ 378:ad7b880ad3d1
Alfredo Esteban - add -l and -f options to lspst
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Thu, 07 Dec 2017 08:43:57 -0800 |
parents | e3a46f66332b |
children |
comparison
equal
deleted
inserted
replaced
377:506e266f930d | 378:ad7b880ad3d1 |
---|---|
6 time_t t; | 6 time_t t; |
7 t = pst_fileTimeToUnixTime(filetime); | 7 t = pst_fileTimeToUnixTime(filetime); |
8 return ctime_r(&t, result); | 8 return ctime_r(&t, result); |
9 } | 9 } |
10 | 10 |
11 size_t pst_fileTimeToString(const FILETIME* filetime, const char* date_format, char* result) { | |
12 time_t t; | |
13 t = pst_fileTimeToUnixTime(filetime); | |
14 return strftime(result, MAXDATEFMTLEN-1, date_format, localtime(&t)); | |
15 } | |
11 | 16 |
12 void pst_fileTimeToStructTM (const FILETIME *filetime, struct tm *result) { | 17 void pst_fileTimeToStructTM (const FILETIME *filetime, struct tm *result) { |
13 time_t t1; | 18 time_t t1; |
14 t1 = pst_fileTimeToUnixTime(filetime); | 19 t1 = pst_fileTimeToUnixTime(filetime); |
15 gmtime_r(&t1, result); | 20 gmtime_r(&t1, result); |