to_number().to_date() gives incorrect result if hh:mm:ss is set
Closed this issue · 0 comments
skilchen commented
the following program:
import rfc3339
var y: DateTime
y.year = 2017
y.month = 9
y.day = 8
y.hour = 1
y.minute = 2
y.second = 3
echo $y
echo y.to_number().to_date()
produces:
2017-09-08T01:02:03Z+00:00
2017-09-08T00:00:03Z+00:00
the second line has wrong values for hour and minute.