Skip to content
Snippets Groups Projects
Commit 56f0ae2f authored by esaunders's avatar esaunders
Browse files

Added a platform specific define for tzname.

parent b1298794
Branches
Tags
No related merge requests found
......@@ -145,6 +145,7 @@ typedef WCHAR TSK_TCHAR; ///< Character data type that is UTF-16 (wchar_t
#define TSNPRINTF _snwprintf
#define TPUTENV _wputenv
#define TZSET _tzset
#define TZNAME _tzname
#if defined(_MSC_VER)
#define TSTRTOULL _wcstoui64
......@@ -197,6 +198,7 @@ typedef char TSK_TCHAR; ///< Character data type that is UTF-16 (wchar_t
#define TPUTENV putenv
#define TZSET tzset
#define TZNAME tzname
#define PRIcTSK _TSK_T("s") ///< sprintf macro to print a UTF-8 char string to TSK_TCHAR buffer
#define PRIwTSK _TSK_T("S") ///< sprintf macro to print a UTF-16 wchar_t string to TSK_TCHAR buffer
......
......@@ -305,7 +305,7 @@ tsk_fs_time_to_str(time_t time, char buf[128])
(int) tmTime->tm_mon + 1, (int) tmTime->tm_mday,
tmTime->tm_hour,
(int) tmTime->tm_min, (int) tmTime->tm_sec,
_tzname[(tmTime->tm_isdst == 0) ? 0 : 1]);
TZNAME[(tmTime->tm_isdst == 0) ? 0 : 1]);
}
return buf;
}
......@@ -334,7 +334,7 @@ tsk_fs_time_to_str_subsecs(time_t time, unsigned int subsecs,
(int) tmTime->tm_mon + 1, (int) tmTime->tm_mday,
tmTime->tm_hour,
(int) tmTime->tm_min, (int) tmTime->tm_sec,
subsecs, _tzname[(tmTime->tm_isdst == 0) ? 0 : 1]);
subsecs, TZNAME[(tmTime->tm_isdst == 0) ? 0 : 1]);
}
return buf;
}
......@@ -373,7 +373,7 @@ tsk_fs_print_day(FILE * hFile, time_t time)
tsk_fprintf(hFile, "%.4d-%.2d-%.2d 00:00:00 (%s)",
(int) tmTime->tm_year + 1900,
(int) tmTime->tm_mon + 1, (int) tmTime->tm_mday,
_tzname[(tmTime->tm_isdst == 0) ? 0 : 1]);
TZNAME[(tmTime->tm_isdst == 0) ? 0 : 1]);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment