Bug #930
strftime does not work on Windows 7
| Status: | Unlikely or Unfixable | Start: | 12/26/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | Engine | Spent time: | - | |
| Target version: | 0.6 | |||
| Milestones: | ||||
| Votes: | 0 |
Description
I noticed something earlier, when I use the "time" command (use "sv_cmd time" to see for yourself), I see no output where the strftime should be. The interesting thing is, the "showtime" display in the bottom right hand corner works just fine, so why does this fail?
BTW, this also breaks servers trying to send stats from Windows.... though, I doubt there are (m)any Windows servers out there hosting for Xonotic/opensource games in general :P Let alone ones trying to send statistics.
History
Updated by divVerent 5 months ago
This is because we use some strftime() format specifiers that are not portable.
In particular, %s is not portable. We must add a new engine builtin to get the unix time, as strftime on "%s" is only working on Linux - and even there it does the wrong thing regarding time zone handling.