mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-20 19:07:15 -07:00
81bc1d7af5
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
51 lines
1.8 KiB
C
51 lines
1.8 KiB
C
/*
|
|
* Asterisk -- An open source telephony toolkit.
|
|
*
|
|
* Copyright (C) 1999 - 2005, Digium, Inc.
|
|
*
|
|
* Mark Spencer <markster@digium.com>
|
|
* Tilghman Lesher <tlesher@vcch.com>
|
|
*
|
|
* See http://www.asterisk.org for more information about
|
|
* the Asterisk project. Please do not directly contact
|
|
* any of the maintainers of this project for assistance;
|
|
* the project provides a web site, mailing lists and IRC
|
|
* channels for your use.
|
|
*
|
|
* This program is free software, distributed under the terms of
|
|
* the GNU General Public License Version 2. See the LICENSE file
|
|
* at the top of the source tree.
|
|
*/
|
|
|
|
/*! \file
|
|
* \brief Custom localtime functions for multiple timezones
|
|
*/
|
|
|
|
#ifndef _ASTERISK_LOCALTIME_H
|
|
#define _ASTERISK_LOCALTIME_H
|
|
|
|
struct ast_tm {
|
|
int tm_sec; /* Seconds. [0-60] (1 leap second) */
|
|
int tm_min; /* Minutes. [0-59] */
|
|
int tm_hour; /* Hours. [0-23] */
|
|
int tm_mday; /* Day. [1-31] */
|
|
int tm_mon; /* Month. [0-11] */
|
|
int tm_year; /* Year - 1900. */
|
|
int tm_wday; /* Day of week. [0-6] */
|
|
int tm_yday; /* Days in year.[0-365] */
|
|
int tm_isdst; /* DST. [-1/0/1]*/
|
|
long int tm_gmtoff; /* Seconds east of UTC. */
|
|
char *tm_zone; /* Timezone abbreviation. */
|
|
/* NOTE: do NOT reorder this final item. The order needs to remain compatible with struct tm */
|
|
int tm_usec; /* microseconds */
|
|
};
|
|
|
|
int ast_tzsetwall(void);
|
|
void ast_tzset(const char *name);
|
|
struct ast_tm *ast_localtime(const struct timeval *timep, struct ast_tm *p_tm, const char *zone);
|
|
time_t ast_mktime(struct ast_tm * const tmp, const char *zone);
|
|
char *ast_ctime(const struct timeval * const timep, char *buf);
|
|
int ast_strftime(char *buf, size_t len, const char *format, const struct ast_tm *tm);
|
|
|
|
#endif /* _ASTERISK_LOCALTIME_H */
|