mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-27 23:37:05 -05:00
fix: Use UTC for data inspector date/time display (#2675)
time_t should not be converted to local time zone.
This commit is contained in:
@@ -763,7 +763,7 @@ namespace hex::plugin::builtin {
|
|||||||
|
|
||||||
std::string value;
|
std::string value;
|
||||||
try {
|
try {
|
||||||
auto time = std::localtime(&endianAdjustedTime);
|
auto time = std::gmtime(&endianAdjustedTime);
|
||||||
if (time == nullptr) {
|
if (time == nullptr) {
|
||||||
value = "Invalid";
|
value = "Invalid";
|
||||||
} else {
|
} else {
|
||||||
@@ -783,7 +783,7 @@ namespace hex::plugin::builtin {
|
|||||||
|
|
||||||
std::string value;
|
std::string value;
|
||||||
try {
|
try {
|
||||||
auto time = std::localtime(&endianAdjustedTime);
|
auto time = std::gmtime(&endianAdjustedTime);
|
||||||
if (time == nullptr) {
|
if (time == nullptr) {
|
||||||
value = "Invalid";
|
value = "Invalid";
|
||||||
} else {
|
} else {
|
||||||
@@ -805,7 +805,7 @@ namespace hex::plugin::builtin {
|
|||||||
|
|
||||||
std::string value;
|
std::string value;
|
||||||
try {
|
try {
|
||||||
auto time = std::localtime(&endianAdjustedTime);
|
auto time = std::gmtime(&endianAdjustedTime);
|
||||||
if (time == nullptr) {
|
if (time == nullptr) {
|
||||||
value = "Invalid";
|
value = "Invalid";
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user