Commit a14a8b27 authored by Rob Pike's avatar Rob Pike

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
parent 93689d86
......@@ -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);
......
......@@ -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]+:`;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment