You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
100; // Display nanoseconds instead of milliseconds for higher resolution
_snprintf_s(buffer,
_countof(buffer),
_TRUNCATE,
"%02d/%02d/%02d %02d:%02d:%02d.%llu",
st.wYear,
st.wMonth,
st.wDay,
st.wHour,
st.wMinute,
st.wSecond,
ullNanoseconds);
rb_hash_aset(hash,
rb_str_new2("TimeCreated"),
rb_str_new2(buffer));
} else {
rb_hash_aset(hash,
rb_str_new2("TimeCreated"),
Qnil);
}
This is because FileTimeToSystemTime just handles FileTime as UTC.
If we want to convert this UTC based FileTime, we have to call FileTimeToLocalFileTime before calling FileTimeToSystemTime API.
This default behavior is reasonable for western countries. But, for Asia-Pacific countries, its quite weird impressions for some users.
The text was updated successfully, but these errors were encountered:
cosmo0920
changed the title
Provide use localtime option on FileTime handling
Provide use localtime option on FileTime handling
Oct 16, 2021
Currently, we're assuming UTC implicitly on FileTime handling:
winevt_c/ext/winevt/winevt_utils.cpp
Lines 714 to 741 in 9bcea01
This is because
FileTimeToSystemTime
just handles FileTime as UTC.If we want to convert this UTC based FileTime, we have to call
FileTimeToLocalFileTime
before callingFileTimeToSystemTime
API.This default behavior is reasonable for western countries. But, for Asia-Pacific countries, its quite weird impressions for some users.
The text was updated successfully, but these errors were encountered: