File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,8 @@ func (ll *FTWLogLines) getLinesSinceUntil() [][]byte {
79
79
ChunkSize : 4096 ,
80
80
}
81
81
scanner := backscanner .NewOptions (logfile , int (fi .Size ()), backscannerOptions )
82
+ tzonename , _ := time .Now ().Zone ()
83
+ tzone := gostradamus .Timezone (tzonename )
82
84
for {
83
85
line , _ , err := scanner .LineBytes ()
84
86
if err != nil {
@@ -93,7 +95,7 @@ func (ll *FTWLogLines) getLinesSinceUntil() [][]byte {
93
95
date := matchedLine [1 ]
94
96
log .Trace ().Msgf ("ftw/waflog: matched %s in line %s" , date , matchedLine )
95
97
// well, go doesn't want to have a proper time format, so we need to use gostradamus
96
- t , err := gostradamus .Parse (string (date ), ll .TimeFormat )
98
+ t , err := gostradamus .ParseInTimezone (string (date ), ll .TimeFormat , tzone )
97
99
if err != nil {
98
100
log .Error ().Msgf ("ftw/waflog: error parsing date %s" , err .Error ())
99
101
// return with what we got up to now
You can’t perform that action at this time.
0 commit comments