Skip to content

Commit

Permalink
Merge pull request #780 from benedictjohannes/allow-subsecond-time
Browse files Browse the repository at this point in the history
allow-subsecond-settime
  • Loading branch information
tealeg authored Sep 18, 2023
2 parents 61c977e + 1effd1f commit e01f87e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cell.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ func (c *Cell) SetDateTime(t time.Time) {
func (c *Cell) SetDateWithOptions(t time.Time, options DateTimeOptions) {
c.updatable()
_, offset := t.In(options.Location).Zone()
t = time.Unix(t.Unix()+int64(offset), 0)
t = time.Unix(t.Unix()+int64(offset), int64(t.Nanosecond()))
c.SetDateTimeWithFormat(TimeToExcelTime(t.In(timeLocationUTC), c.date1904), options.ExcelTimeFormat)
c.modified = true
}
Expand Down

0 comments on commit e01f87e

Please sign in to comment.