Skip to content

Commit

Permalink
Merge pull request #197 from nathanmcgarvey-modopayments/fix_time_to_…
Browse files Browse the repository at this point in the history
…be_UTC

Fix Comment on the the Timestamp.Time() method
  • Loading branch information
kohenkatz authored Feb 10, 2025
2 parents 5e1b166 + de3c87c commit 7d51018
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion uuid.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ type Timestamp uint64

const _100nsPerSecond = 10000000

// Time returns the UTC time.Time representation of a Timestamp
// Time returns the time.Time representation of a Timestamp.
//
// The resulting time.Time:
// - Contains only wall clock time (no monotonic clock component)
// - Uses the local system timezone for the location
func (t Timestamp) Time() (time.Time, error) {
secs := uint64(t) / _100nsPerSecond
nsecs := 100 * (uint64(t) % _100nsPerSecond)
Expand Down

0 comments on commit 7d51018

Please sign in to comment.