Rewrite test to avoid timezone issues.
This commit is contained in:
parent
0909298bbc
commit
6fc55f14cb
|
@ -97,14 +97,13 @@ class SyslogParserRfc3164Test extends Specification {
|
||||||
void "test parseRfc3164Timestamp"() {
|
void "test parseRfc3164Timestamp"() {
|
||||||
|
|
||||||
setup:
|
setup:
|
||||||
OffsetDateTime odt = OffsetDateTime.now()
|
|
||||||
String dateString = "Sep 12 20:50:13"
|
String dateString = "Sep 12 20:50:13"
|
||||||
|
|
||||||
when:
|
when:
|
||||||
Instant inst = syslogParser.parseTimestamp(dateString)
|
Instant inst = syslogParser.parseTimestamp(dateString)
|
||||||
|
|
||||||
then:
|
then:
|
||||||
inst.toString() == "${odt.getYear()}-09-12T18:50:13Z"
|
inst.epochSecond == 1631472613
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue