Skip to content

Commit

Permalink
refactor context tests to be separate functions (#2540)
Browse files Browse the repository at this point in the history
  • Loading branch information
aldas authored Nov 7, 2023
1 parent c7d6d43 commit 50ebcd8
Show file tree
Hide file tree
Showing 3 changed files with 448 additions and 362 deletions.
2 changes: 1 addition & 1 deletion binder.go
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,7 @@ func (b *ValueBinder) unixTime(sourceParam string, dest *time.Time, valueMustExi
case time.Second:
*dest = time.Unix(n, 0)
case time.Millisecond:
*dest = time.Unix(n/1e3, (n%1e3)*1e6) // TODO: time.UnixMilli(n) exists since Go1.17 switch to that when min version allows
*dest = time.UnixMilli(n)
case time.Nanosecond:
*dest = time.Unix(0, n)
}
Expand Down
Loading

0 comments on commit 50ebcd8

Please sign in to comment.