mirror of
https://github.com/bcicen/ctop.git
synced 2024-08-30 18:23:19 +00:00
docker_logs.go: use time.RFC3339Nano constant
This commit is contained in:
parent
117c3bc7b5
commit
b4a63f8c60
@ -74,12 +74,12 @@ func (l *DockerLogs) Stream() chan models.Log {
|
||||
func (l *DockerLogs) Stop() { l.done <- true }
|
||||
|
||||
func (l *DockerLogs) parseTime(s string) time.Time {
|
||||
ts, err := time.Parse("2006-01-02T15:04:05.000000000Z", s)
|
||||
ts, err := time.Parse(time.RFC3339Nano, s)
|
||||
if err == nil {
|
||||
return ts
|
||||
}
|
||||
|
||||
ts, err2 := time.Parse("2006-01-02T15:04:05.000000000Z", l.stripPfx(s))
|
||||
ts, err2 := time.Parse(time.RFC3339Nano, l.stripPfx(s))
|
||||
if err2 == nil {
|
||||
return ts
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user