change date format in logs - was missing slash between month and day

R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=35526
CL=35540
This commit is contained in:
Rob Pike 2009-10-09 15:44:57 -07:00
parent 93689d863c
commit a14a8b2739
2 changed files with 2 additions and 2 deletions

View 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);

View 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]+:`;