MakeTimestamp returns a time.Time containing all extracted information.
()
| 725 | |
| 726 | // MakeTimestamp returns a time.Time containing all extracted information. |
| 727 | func (fe *fieldExtract) MakeTimestamp() time.Time { |
| 728 | if fe.sentinel != nil { |
| 729 | return *fe.sentinel |
| 730 | } |
| 731 | |
| 732 | year, _ := fe.Get(fieldYear) |
| 733 | month, _ := fe.Get(fieldMonth) |
| 734 | day, _ := fe.Get(fieldDay) |
| 735 | hour, _ := fe.Get(fieldHour) |
| 736 | min, _ := fe.Get(fieldMinute) |
| 737 | sec, _ := fe.Get(fieldSecond) |
| 738 | nano, _ := fe.Get(fieldNanos) |
| 739 | |
| 740 | return time.Date(year, time.Month(month), day, hour, min, sec, nano, fe.MakeLocation()) |
| 741 | } |
| 742 | |
| 743 | // MakeTimestampWithoutTimezone returns a time.Time containing all extracted |
| 744 | // information, minus any timezone information (which is stripped). The returned |
no test coverage detected