expose tzset

This commit is contained in:
Erick Tryzelaar
2012-04-13 17:33:02 -07:00
parent 047f629b31
commit e7ca3e4db0
3 changed files with 23 additions and 1 deletions

View File

@@ -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);