Skip to content

Commit

Permalink
Fix local zone
Browse files Browse the repository at this point in the history
  • Loading branch information
chinhnguyenhuu committed Oct 14, 2022
1 parent 019e050 commit 7e3ebac
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions json/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ func (Encoder) Decode(rawData []byte) (eh.Event, context.Context, error) {
return nil, nil, errors.Wrap(err, string(rawData)+" could not unmarshal event")
}

// Use "Local" location
zone, err := time.LoadLocation("Asia/SaiGon")
if err != nil {
return nil, nil, errors.Wrap(err, string(rawData)+" could not load location")
}
e.Timestamp = e.Timestamp.In(zone)
//// Use "Local" location
//zone, err := time.LoadLocation("Local")
//if err != nil {
// return nil, nil, errors.Wrap(err, string(rawData)+" could not load location")
//}
//e.Timestamp = e.Timestamp.In(zone)

// Create an event of the correct type.
if data, err := eh.CreateEventData(e.EventType); err == nil {
Expand Down

0 comments on commit 7e3ebac

Please sign in to comment.