24 #ifndef _ASTERISK_LOCALTIME_H
25 #define _ASTERISK_LOCALTIME_H
27 #ifdef HAVE_LOCALE_T_IN_LOCALE_H
29 #elif defined(HAVE_LOCALE_T_IN_XLOCALE_H)
32 typedef void * locale_t;
59 void ast_get_dst_info(
const time_t *
const timep,
int *dst_enabled, time_t *dst_start, time_t *dst_end,
int *gmt_off,
const char *
const zone);
81 int ast_strftime_locale(
char *buf,
size_t len,
const char *format,
const struct ast_tm *tm,
const char *locale);
92 char *ast_strptime_locale(
const char *s,
const char *format,
struct ast_tm *tm,
const char *locale);
100 void ast_localtime_wakeup_monitor(
struct ast_test *info);
103 #define AST_ISO8601_FORMAT "%FT%T.%q%z"
105 #define AST_ISO8601_LEN 29
struct ast_tm * ast_localtime(const struct timeval *timep, struct ast_tm *p_tm, const char *zone)
Timezone-independent version of localtime_r(3).
char * ast_strptime(const char *s, const char *format, struct ast_tm *tm)
Special version of strptime(3) which places the answer in the common structure ast_tm. Also, unlike strptime(3), ast_strptime() initializes its memory prior to use.
const char * ast_setlocale(const char *locale)
Set the thread-local representation of the current locale.
int ast_strftime(char *buf, size_t len, const char *format, const struct ast_tm *tm)
Special version of strftime(3) that handles fractions of a second. Takes the same arguments as strfti...
struct timeval ast_mktime(struct ast_tm *const tmp, const char *zone)
Timezone-independent version of mktime(3).