Fix more broken timestamps

This commit is contained in:
elasota
2024-08-07 01:55:37 -04:00
parent a3e8b51b37
commit 1663d9d6fe
2 changed files with 2 additions and 2 deletions

View File

@@ -72,7 +72,7 @@ int ProcessFileDatesInfo(FILE *f, uint32_t length, PortabilityLayer::MacFileProp
return -1; return -1;
} }
const int64_t asEpochToMacEpoch = -3029547600LL; const int64_t asEpochToMacEpoch = 3029547600LL;
// Mac epoch in Unix time: -2082844800 // Mac epoch in Unix time: -2082844800
// ASAD epoch in Unix time: 946702800 // ASAD epoch in Unix time: 946702800

View File

@@ -91,7 +91,7 @@ GpSystemServices_Web::GpSystemServices_Web()
int64_t GpSystemServices_Web::GetTime() const int64_t GpSystemServices_Web::GetTime() const
{ {
time_t t = time(nullptr); time_t t = time(nullptr);
return static_cast<int64_t>(t) - 2082844800; return static_cast<int64_t>(t) + 2082844800;
} }
void GpSystemServices_Web::GetLocalDateTime(unsigned int &year, unsigned int &month, unsigned int &day, unsigned int &hour, unsigned int &minute, unsigned int &second) const void GpSystemServices_Web::GetLocalDateTime(unsigned int &year, unsigned int &month, unsigned int &day, unsigned int &hour, unsigned int &minute, unsigned int &second) const