expose tzset
This commit is contained in:
@@ -529,6 +529,11 @@ struct tm* LOCALTIME(const time_t *clock, tm *result) {
|
||||
#define TIMEGM(result) timegm(result)
|
||||
#endif
|
||||
|
||||
extern "C" CDECL void
|
||||
rust_tzset() {
|
||||
TZSET();
|
||||
}
|
||||
|
||||
extern "C" CDECL void
|
||||
rust_gmtime(int64_t *sec, int32_t *nsec, rust_tm *timeptr) {
|
||||
tm tm;
|
||||
@@ -541,7 +546,6 @@ rust_gmtime(int64_t *sec, int32_t *nsec, rust_tm *timeptr) {
|
||||
extern "C" CDECL void
|
||||
rust_localtime(int64_t *sec, int32_t *nsec, rust_tm *timeptr) {
|
||||
tm tm;
|
||||
TZSET();
|
||||
time_t s = *sec;
|
||||
LOCALTIME(&s, &tm);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user