Skip to content

Commit a79c984

Browse files
committed
fix(rfc3164): timezone examples
Signed-off-by: Leonardo Di Donato <[email protected]>
1 parent e5ef80c commit a79c984

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

rfc3164/example_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ func Example_withtimezone() {
7979
}
8080

8181
func Example_withtimezone_and_year() {
82-
cet, _ := time.LoadLocation("CET")
82+
est, _ := time.LoadLocation("EST")
8383
i := []byte(`<13>Jan 30 02:08:03 host app: Test`)
84-
p := NewParser(WithTimezone(cet), WithYear(Year{YYYY: 1987}))
84+
p := NewParser(WithTimezone(est), WithYear(Year{YYYY: 1987}))
8585
m, _ := p.Parse(i)
8686
output(m)
8787
// Output:
@@ -90,7 +90,7 @@ func Example_withtimezone_and_year() {
9090
// Facility: (*uint8)(1),
9191
// Severity: (*uint8)(5),
9292
// Priority: (*uint8)(13),
93-
// Timestamp: (*time.Time)(1987-01-30 03:08:03 +0100 CET),
93+
// Timestamp: (*time.Time)(1987-01-29 21:08:03 -0500 EST),
9494
// Hostname: (*string)((len=4) "host"),
9595
// Appname: (*string)((len=3) "app"),
9696
// ProcID: (*string)(<nil>),
@@ -122,7 +122,7 @@ func Example_besteffort() {
122122
}
123123

124124
func Example_rfc3339timestamp() {
125-
i := []byte(`<28>2019-12-02T16:49:23+01:00 host app[23410]: Test`)
125+
i := []byte(`<28>2019-12-02T16:49:23+02:00 host app[23410]: Test`)
126126
p := NewParser(WithRFC3339())
127127
m, _ := p.Parse(i)
128128
output(m)
@@ -132,7 +132,7 @@ func Example_rfc3339timestamp() {
132132
// Facility: (*uint8)(3),
133133
// Severity: (*uint8)(4),
134134
// Priority: (*uint8)(28),
135-
// Timestamp: (*time.Time)(2019-12-02 16:49:23 +0100 CET),
135+
// Timestamp: (*time.Time)(2019-12-02 16:49:23 +0200 +0200),
136136
// Hostname: (*string)((len=4) "host"),
137137
// Appname: (*string)((len=3) "app"),
138138
// ProcID: (*string)((len=5) "23410"),

0 commit comments

Comments
 (0)