Skip to content

Commit

Permalink
remove name and PROVE that it produces the same result
Browse files Browse the repository at this point in the history
  • Loading branch information
Robindiddams committed Sep 24, 2020
1 parent 7d85683 commit 04c70c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion datetime/time.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ func TimeFromDate(date Date) time.Time {
return ts
}
// apply timezone
loc := time.FixedZone("pinpt", int(date.Offset*60))
loc := time.FixedZone("", int(date.Offset*60))
return ts.In(loc)
}

Expand Down
2 changes: 2 additions & 0 deletions datetime/time_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,4 +325,6 @@ func TestTimeFromDate(t *testing.T) {
assert.EqualValues(date.Offset, offset/60)
assert.EqualValues(date.Epoch, TimeToEpoch(tv))
assert.EqualValues(date.Rfc3339, tv.Format(RFC3339))
rf, _ := time.Parse(time.RFC3339, "2018-06-04T10:05:49-04:00")
assert.EqualValues(rf.String(), tv.String())
}

0 comments on commit 04c70c8

Please sign in to comment.