pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/bulk print date and time in UTC.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1d53cbae839a
branches:  trunk
changeset: 467914:1d53cbae839a
user:      grant <grant%pkgsrc.org@localhost>
date:      Sun Feb 08 12:54:05 2004 +0000

description:
print date and time in UTC.

diffstat:

 mk/bulk/post-build |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r 6458a77f5794 -r 1d53cbae839a mk/bulk/post-build
--- a/mk/bulk/post-build        Sun Feb 08 12:47:23 2004 +0000
+++ b/mk/bulk/post-build        Sun Feb 08 12:54:05 2004 +0000
@@ -1,5 +1,5 @@
 #!/usr/pkg/bin/perl
-# $NetBSD: post-build,v 1.32 2004/02/08 09:13:43 grant Exp $
+# $NetBSD: post-build,v 1.33 2004/02/08 12:54:05 grant Exp $
 #
 # Collect stuff after a pkg bulk build
 #
@@ -7,6 +7,7 @@
 #
 
 use File::Basename;
+use POSIX ();
 
 # Where config vars are stored (/bin/sh syntax)
 
@@ -33,7 +34,6 @@
 getconf("USR_PKGSRC");         # "/usr/pkgsrc"
 getconf("osrev");              # `uname -r`
 getconf("arch");               # `uname -m`
-$enddate=localtime(time());
 $reportf=basename($REPORT);
 
 chomp($os=`uname -s`);
@@ -64,7 +64,9 @@
 if ($startdate == 0) {
        $startdate = "unknown";
 } else {
-       $startdate = localtime($startdate)."";
+       local $ENV{TZ} = "UTC";
+       $startdate = POSIX::strftime("%c %Z", gmtime($startdate));
+       $enddate = POSIX::strftime("%c %Z", gmtime(time()));
 }
 
 $verbose=1;



Home | Main Index | Thread Index | Old Index