diff options
author | Max Kellermann <max@duempel.org> | 2010-05-18 23:54:03 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2010-05-18 23:54:12 +0200 |
commit | 0a9b0dd07049b644a10ee920497a163ce6e23967 (patch) | |
tree | d66c77a50f1c15c7563cd8062edbde7db90aa214 /src/command.c | |
parent | 6aa0f61e15c1410e122096bc781a9443e4017385 (diff) | |
download | mpd-0a9b0dd07049b644a10ee920497a163ce6e23967.tar.gz mpd-0a9b0dd07049b644a10ee920497a163ce6e23967.tar.xz mpd-0a9b0dd07049b644a10ee920497a163ce6e23967.zip |
command: fallback strftime() formats on WIN32
On WIN32, "%F" and "%T" are not implemented.
Diffstat (limited to '')
-rw-r--r-- | src/command.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/command.c b/src/command.c index d514d0698..df0146c16 100644 --- a/src/command.c +++ b/src/command.c @@ -387,10 +387,12 @@ print_spl_list(struct client *client, GPtrArray *list) client_printf(client, "playlist: %s\n", playlist->name); t = playlist->mtime; - strftime(timestamp, sizeof(timestamp), "%FT%TZ", -#ifdef WIN32 + strftime(timestamp, sizeof(timestamp), +#ifdef G_OS_WIN32 + "%Y-%m-%dT%H:%M:%SZ", gmtime(&t) #else + "%FT%TZ", gmtime_r(&t, &tm) #endif ); |