]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/world.qc
Merge branch 'terencehill/strftime_s' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / world.qc
index 6628b4236c39ab3ed7d1592af909b50e9b4c1356..dd8e86b78ddc62fd49e90d8f2c71807403044f14 100644 (file)
@@ -838,7 +838,8 @@ spawnfunc(worldspawn)
        // character set: ASCII 33-126 without the following characters: : ; ' " \ $
        if(autocvar_sv_eventlog)
        {
-               string s = sprintf("%s.%s.%06d", itos(autocvar_sv_eventlog_files_counter), strftime(false, "%s"), floor(random() * 1000000));
+               string num = strftime_s(); // strftime(false, "%s") isn't reliable, see strftime_s description
+               string s = sprintf("%s.%s.%06d", itos(autocvar_sv_eventlog_files_counter), num, floor(random() * 1000000));
                matchid = strzone(s);
 
                GameLogEcho(strcat(":gamestart:", GetGametype(), "_", GetMapname(), ":", s));