]> Cypherpunks repositories - gostls13.git/commitdiff
change date format in logs - was missing slash between month and day
authorRob Pike <r@golang.org>
Fri, 9 Oct 2009 22:44:57 +0000 (15:44 -0700)
committerRob Pike <r@golang.org>
Fri, 9 Oct 2009 22:44:57 +0000 (15:44 -0700)
R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=35526
CL=35540

src/pkg/log/log.go
src/pkg/log/log_test.go

index 80c72a6bcb94bb4de6413ab9f3448fad3897d874..221016674491fabc164c7077eb82016d4fa66784 100644 (file)
@@ -86,7 +86,7 @@ func (l *Logger) formatHeader(ns int64, calldepth int) string {
        if l.flag & (Ldate | Ltime | Lmicroseconds) != 0 {
                t := time.SecondsToLocalTime(ns/1e9);
                if l.flag & (Ldate) != 0 {
-                       h += itoa(int(t.Year), 4) + "/" + itoa(t.Month, 2) + itoa(t.Day, 2) + " ";
+                       h += itoa(int(t.Year), 4) + "/" + itoa(t.Month, 2) + "/" + itoa(t.Day, 2) + " ";
                }
                if l.flag & (Ltime | Lmicroseconds) != 0 {
                        h += itoa(t.Hour, 2) + ":" + itoa(t.Minute, 2) + ":" + itoa(t.Second, 2);
index 9c28405dc76de1a6c78153173ccf48f9976d568d..f26ce4087edf0859865601f0301e2f77a40cd4b5 100644 (file)
@@ -14,7 +14,7 @@ import (
 )
 
 const (
-       Rdate           = `[0-9][0-9][0-9][0-9]/[0-9][0-9][0-9][0-9]`;
+       Rdate           = `[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]`;
        Rtime           = `[0-9][0-9]:[0-9][0-9]:[0-9][0-9]`;
        Rmicroseconds   = `\.[0-9][0-9][0-9][0-9][0-9][0-9]`;
        Rline           = `[0-9]+:`;