mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-26 20:38:25 +00:00
Add cs_timegm
Which is a slightly modified version from https://stackoverflow.com/questions/283166/easy-way-to-convert-a-struct-tm-expressed-in-utc-to-time-t-type PUBLISHED_FROM=b73f920ca42c45473c23337782e815306bdf69f1
This commit is contained in:
1 parent
3d6b568c6e
commit
0aaba7a461
2 files changed
+43
No files matched your search
@@ -1797,6 +1797,8 @@ void cs_hmac_sha1(const unsigned char *key, size_t key_len,
|
||||
#ifndef CS_COMMON_CS_TIME_H_
|
||||
#define CS_COMMON_CS_TIME_H_
|
||||
|
||||
#include <time.h>
|
||||
|
||||
/* Amalgamated: #include "common/platform.h" */
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -1806,6 +1808,12 @@ extern "C" {
|
||||
/* Sub-second granularity time(). */
|
||||
double cs_time(void);
|
||||
|
||||
/*
|
||||
* Similar to (non-standard) timegm, converts broken-down time into the number
|
||||
* of seconds since Unix Epoch.
|
||||
*/
|
||||
double cs_timegm(const struct tm *tm);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
Reference in new issue
Block a user