Rewrite test to avoid timezone issues.

This commit is contained in:
Mark Nellemann 2021-01-27 15:26:47 +01:00
parent 0909298bbc
commit 6fc55f14cb

View file

@ -97,14 +97,13 @@ class SyslogParserRfc3164Test extends Specification {
void "test parseRfc3164Timestamp"() {
setup:
OffsetDateTime odt = OffsetDateTime.now()
String dateString = "Sep 12 20:50:13"
when:
Instant inst = syslogParser.parseTimestamp(dateString)
then:
inst.toString() == "${odt.getYear()}-09-12T18:50:13Z"
inst.epochSecond == 1631472613
}
}