File: trace-UTC_timestamps

package info (click to toggle)
mirmon 2.11-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 956 kB
  • sloc: perl: 2,923; sh: 34; makefile: 6
file content (39 lines) | stat: -rw-r--r-- 1,270 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
convert non-numeric timestamp to numeric one
Index: mirmon/Mirmon.pm
===================================================================
--- mirmon.orig/Mirmon.pm	2014-08-20 00:16:29.814764572 +0900
+++ mirmon/Mirmon.pm	2014-08-20 00:16:29.810764556 +0900
@@ -1545,6 +1545,14 @@
     else
       { $res = ( split ' ', $res ) [ 0 ] ;
 
+# Debian repository mirrors' timestamp is like "Thu Sep  6 08:00:01 UTC 2007",
+# so we need to hack this.
+
+    if ( $res !~ /^[0-9]*$/ )
+      { $res = `date --date "$res" +%s` ;
+        $res =~ s/\n// ;
+      }
+
         if ( $res !~ /^\d+$/ )
           { $res =~ s/ /_/g ;
             $res = Base::htmlquote $res ;
Index: mirmon/mirmon
===================================================================
--- mirmon.orig/mirmon	2014-08-20 00:16:29.814764572 +0900
+++ mirmon/mirmon	2014-08-20 00:16:29.810764556 +0900
@@ -1545,6 +1545,14 @@
     else
       { $res = ( split ' ', $res ) [ 0 ] ;
 
+# Debian repository mirrors' timestamp is like "Thu Sep  6 08:00:01 UTC 2007",
+# so we need to hack this.
+
+    if ( $res !~ /^[0-9]*$/ )
+      { $res = `date --date "$res" +%s` ;
+        $res =~ s/\n// ;
+      }
+
         if ( $res !~ /^\d+$/ )
           { $res =~ s/ /_/g ;
             $res = Base::htmlquote $res ;