]> git.saurik.com Git - apple/security.git/blob - CertTool/cdsaUtils/timeStr.h
Security-54.1.7.tar.gz
[apple/security.git] / CertTool / cdsaUtils / timeStr.h
1 #ifndef _TIME_STR_H_
2 #define _TIME_STR_H_
3
4 #include <time.h>
5
6 #define UTC_TIME_STRLEN 13
7 #define GENERALIZED_TIME_STRLEN 15
8
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12
13 /*
14 * Given a string containing either a UTC-style or "generalized time"
15 * time string, convert to a struct tm (in GMT/UTC). Returns nonzero on
16 * error.
17 */
18 int appTimeStringToTm(
19 const char *str,
20 unsigned len,
21 struct tm *tmp);
22
23 #ifdef __cplusplus
24 }
25 #endif
26
27 #endif /* _TIME_STR_H_ */