diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-12-22 09:53:27 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-12-22 12:21:16 +0100 |
commit | 07bcf6197d9fbdc038513ae3db7f83a9bb8a6cd9 (patch) | |
tree | 5b004d8c0bb2b12e447e608c0e9c89211591f6e9 | |
parent | 4ef842c0d29e09d5876d11eee885b45a11f8c08d (diff) | |
download | samba-07bcf6197d9fbdc038513ae3db7f83a9bb8a6cd9.tar.gz samba-07bcf6197d9fbdc038513ae3db7f83a9bb8a6cd9.tar.bz2 samba-07bcf6197d9fbdc038513ae3db7f83a9bb8a6cd9.zip |
lib/util/time.c - make the "strftime" output locale independant ("%c" is not)
So that it also works on Solaris.
-rw-r--r-- | lib/util/time.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/util/time.c b/lib/util/time.c index 7c1532a230..770ebc4374 100644 --- a/lib/util/time.c +++ b/lib/util/time.c @@ -384,11 +384,10 @@ _PUBLIC_ char *timestring(TALLOC_CTX *mem_ctx, time_t t) } #ifdef HAVE_STRFTIME - /* some versions of gcc complain about using %c. This is a bug - in the gcc warning, not a bug in this code. See a recent - strftime() manual page for details. - */ - strftime(tempTime,sizeof(tempTime)-1,"%c %Z",tm); + /* Some versions of gcc complain about using some special format + * specifiers. This is a bug in gcc, not a bug in this code. See a + * recent strftime() manual page for details. */ + strftime(tempTime,sizeof(tempTime)-1,"%a %b %e %X %Y %Z",tm); TimeBuf = talloc_strdup(mem_ctx, tempTime); #else TimeBuf = talloc_strdup(mem_ctx, asctime(tm)); |