comparison src/timeconv.c @ 199:e3a46f66332b

more changes in recurrence decoding
author Carl Byington <carl@five-ten-sg.com>
date Wed, 13 May 2009 11:59:55 -0700
parents 7c60d6d1c681
children ad7b880ad3d1
comparison
equal deleted inserted replaced
198:7c60d6d1c681 199:e3a46f66332b
1 #include "define.h" 1 #include "define.h"
2 2
3 3
4 4
5 char * pst_fileTimeToAscii(const FILETIME* filetime) { 5 char* pst_fileTimeToAscii(const FILETIME* filetime, char* result) {
6 time_t t; 6 time_t t;
7 t = pst_fileTimeToUnixTime(filetime); 7 t = pst_fileTimeToUnixTime(filetime);
8 return ctime(&t); 8 return ctime_r(&t, result);
9 } 9 }
10 10
11 11
12 struct tm * pst_fileTimeToStructTM (const FILETIME *filetime) { 12 void pst_fileTimeToStructTM (const FILETIME *filetime, struct tm *result) {
13 time_t t1; 13 time_t t1;
14 t1 = pst_fileTimeToUnixTime(filetime); 14 t1 = pst_fileTimeToUnixTime(filetime);
15 return gmtime(&t1); 15 gmtime_r(&t1, result);
16 } 16 }
17 17
18 18
19 time_t pst_fileTimeToUnixTime(const FILETIME *filetime) 19 time_t pst_fileTimeToUnixTime(const FILETIME *filetime)
20 { 20 {