test
This commit is contained in:
parent
ffbd0513f9
commit
8a2f39ddcb
6
def.go
6
def.go
@ -126,9 +126,9 @@ func fromChatWarsDate(d string) (t time.Time, err error) {
|
||||
|
||||
t, _ := time.Parse(time.RFC3339, "2018-01-31T00:00:00+00:00")
|
||||
t = t.AddDate(0, 0, (days / 3))
|
||||
t = t.Add(time.Hour * ((days % 3) * 8))
|
||||
t = t.Add(time.Minute * (hour * 20))
|
||||
t = t.Add(time.Second * (minute * 20))
|
||||
t = t.Add(time.Hour * time.Duration(days%3) * 8)
|
||||
t = t.Add(time.Minute * time.Duration(hour) * 20)
|
||||
t = t.Add(time.Second * time.Duration(minute) * 20)
|
||||
return t, nil
|
||||
} else {
|
||||
return time.Now(), errors.New("Wrong format")
|
||||
|
Loading…
Reference in New Issue
Block a user