citizenfx / fivem

The source code for the Cfx.re modification frameworks, such as FiveM, RedM and LibertyM, as well as FXServer.
https://cfx.re/
3.4k stars 1.99k forks source link

CitizenFX Logfile wrong time #2569

Closed Mathu-lmn closed 11 hours ago

Mathu-lmn commented 1 month ago

What happened?

I noticed that the log files name have a 2 hour delay. I launched FiveM at 14:20 and the file name shows 12:20

Expected result

The file name shows the correct time of opening FiveM

Reproduction steps

  1. Open FiveM
  2. Open your logs folder and notice the 2hr delay

Importancy

Slight inconvenience

Area(s)

FiveM

Specific version(s)

FiveM b3095

Additional information

No response

DerDevHD commented 1 month ago
#pragma once

struct TickCountData
{
    uint64_t tickCount;
    SYSTEMTIME initTime;

    TickCountData()
    {
        tickCount = GetTickCount64();
        GetSystemTime(&initTime);
    }
};

https://github.com/citizenfx/fivem/blob/53fd342c5a0ffabb23e4b89763d4966e1e95def7/code/client/launcher/TickCountData.h

The timestamps of the log files are in UTC-Format. See https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getsystemtime. I'm sure that UTC was chosen for specific reasons there.

FabianTerhorst commented 11 hours ago

Closed, because every timestamp in error logs, artifacts, ... is using utc.