]> Dogcows Code - chaz/tar/commitdiff
(tartime): Print UTC if --utc was given.
authorSergey Poznyakoff <gray@gnu.org.ua>
Sun, 29 Feb 2004 00:05:31 +0000 (00:05 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Sun, 29 Feb 2004 00:05:31 +0000 (00:05 +0000)
src/list.c

index 3e2d127c606f87704e4a49073004b96b98c4fa33..869f2d0aac145b3d08aa3c7767dbf0f1bc18a95a 100644 (file)
@@ -20,7 +20,7 @@
    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* Define to non-zero for forcing old ctime format instead of ISO format.  */
-#undef USE_OLD_CTIME
+#undef USE_OLD_CTIME 
 
 #include "system.h"
 #include <quotearg.h>
@@ -900,7 +900,7 @@ tartime (time_t t)
 #else
   /* Use ISO 8610 format.  See:
      http://www.cl.cam.ac.uk/~mgk25/iso-time.html  */
-  struct tm *tm = localtime (&t);
+  struct tm *tm = utc_option ? gmtime (&t) : localtime (&t);
   if (tm)
     {
       sprintf (buffer, "%04ld-%02d-%02d %02d:%02d:%02d",
This page took 0.029163 seconds and 4 git commands to generate.