Skip to content

Commit 2b9741c

Browse files
cosmo0920edsiper
authored andcommitted
in_winevtlog: Initialize TZInfo correctly
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent 25b3126 commit 2b9741c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

plugins/in_winevtlog/pack.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ static int pack_systemtime(struct winevtlog_config *ctx, SYSTEMTIME *st)
192192
DYNAMIC_TIME_ZONE_INFORMATION dtzi;
193193
SYSTEMTIME st_local;
194194

195+
_tzset();
196+
195197
GetDynamicTimeZoneInformation(&dtzi);
196198

197199
locale = _get_current_locale();
@@ -234,6 +236,8 @@ static int pack_filetime(struct winevtlog_config *ctx, ULONGLONG filetime)
234236
SYSTEMTIME st;
235237
_locale_t locale;
236238

239+
_tzset();
240+
237241
locale = _get_current_locale();
238242
if (locale == NULL) {
239243
return -1;

0 commit comments

Comments
 (0)