diff --git a/console.go b/console.go index 5730f75..f25bc32 100644 --- a/console.go +++ b/console.go @@ -292,13 +292,16 @@ func colorize(s interface{}, c int, disabled bool) string { var ( consoleDefaultFormatTimestamp = func(i interface{}) string { t := "" - if tt, ok := i.(string); ok { + switch tt := i.(type) { + case string: ts, err := time.Parse(time.RFC3339, tt) if err != nil { t = tt } else { t = ts.Format(consoleTimeFormat) } + case json.Number: + t = tt.String() } return colorize(t, colorFaint, consoleNoColor) }