Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Commit

Permalink
pkg/time: fix documentation bug in Unix
Browse files Browse the repository at this point in the history
returns UTC, not local

Fixes #930

Change-Id: I9baf6495b8c5a5cca33e8842d241c44b2c1c154d
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/9525
Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
  • Loading branch information
mpvl committed Apr 28, 2021
1 parent 89abc18 commit a7d3987
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/time/time.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func Parse(layout, value string) (string, error) {
return t.UTC().Format(time.RFC3339Nano), nil
}

// Unix returns the local Time corresponding to the given Unix time,
// Unix returns the Time, in UTC, corresponding to the given Unix time,
// sec seconds and nsec nanoseconds since January 1, 1970 UTC.
// It is valid to pass nsec outside the range [0, 999999999].
// Not all sec values have a corresponding time value. One such
Expand Down

0 comments on commit a7d3987

Please sign in to comment.