stropTimezone converts the given time to a time that looks the same but is in UTC, e.g. from 2020-06-26 01:02:03 +0200 CEST to 2020-06-27 01:02:03 +0000 UTC. Note that the two times don't represent the same time instant.
(t time.Time)
| 718 | // |
| 719 | // Note that the two times don't represent the same time instant. |
| 720 | func stripTimezone(t time.Time) time.Time { |
| 721 | _, offset := t.Zone() |
| 722 | t = t.Add(time.Duration(offset) * time.Second).UTC() |
| 723 | return t |
| 724 | } |
| 725 | |
| 726 | // MakeTimestamp returns a time.Time containing all extracted information. |
| 727 | func (fe *fieldExtract) MakeTimestamp() time.Time { |
no test coverage detected