'LibPst'
timeconv.c File Reference
#include "define.h"
Include dependency graph for timeconv.c:

Go to the source code of this file.

Functions

char * pst_fileTimeToAscii (const FILETIME *filetime, char *result)
 Convert a FILETIME to ascii printable local time. More...
 
size_t pst_fileTimeToString (const FILETIME *filetime, const char *date_format, char *result)
 Convert a FILETIME to string in date_format format. More...
 
void pst_fileTimeToStructTM (const FILETIME *filetime, struct tm *result)
 Convert a FILETIME to unix struct tm. More...
 
time_t pst_fileTimeToUnixTime (const FILETIME *filetime)
 Convert a FILETIME to unix time_t value. More...
 

Function Documentation

◆ pst_fileTimeToAscii()

char* pst_fileTimeToAscii ( const FILETIME filetime,
char *  result 
)

Convert a FILETIME to ascii printable local time.

Parameters
[in]filetimetime structure to be converted
[out]resultpointer to output buffer, must be at least 30 bytes.
Returns
result pointer to the output buffer

Definition at line 5 of file timeconv.c.

References pst_fileTimeToUnixTime().

Referenced by pst_process().

Here is the call graph for this function:

◆ pst_fileTimeToString()

size_t pst_fileTimeToString ( const FILETIME filetime,
const char *  date_format,
char *  result 
)

Convert a FILETIME to string in date_format format.

Parameters
[in]filetimetime structure to be converted
[in]date_formatstring ctime_r format of output date
[out]resultpointer to output buffer, must be at least 30 bytes.
Returns
result size_t value returned by strftime

Definition at line 11 of file timeconv.c.

References MAXDATEFMTLEN, and pst_fileTimeToUnixTime().

Referenced by process().

Here is the call graph for this function:

◆ pst_fileTimeToStructTM()

void pst_fileTimeToStructTM ( const FILETIME filetime,
struct tm *  result 
)

Convert a FILETIME to unix struct tm.

Parameters
[in]filetimetime structure to be converted
[out]resultpointer to output struct tm

Definition at line 17 of file timeconv.c.

References pst_fileTimeToUnixTime().

Referenced by pst_rfc2425_datetime_format(), and pst_rfc2445_datetime_format().

Here is the call graph for this function:

◆ pst_fileTimeToUnixTime()

time_t pst_fileTimeToUnixTime ( const FILETIME filetime)

Convert a FILETIME to unix time_t value.

Parameters
[in]filetimetime structure to be converted
Returns
result time_t value

Definition at line 24 of file timeconv.c.

References FILETIME::dwHighDateTime, and FILETIME::dwLowDateTime.

Referenced by pst_fileTimeToAscii(), pst_fileTimeToString(), pst_fileTimeToStructTM(), and write_normal_email().