Skip to content

Commit

Permalink
RT EvaluateAt
Browse files Browse the repository at this point in the history
  • Loading branch information
irees committed Dec 2, 2023
1 parent a9ea742 commit 9af1eb6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions validator/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ type Options struct {
IncludeEntities bool
IncludeEntitiesLimit int
IncludeRouteGeometries bool
EvaluateAt time.Time
ValidateRealtimeMessages []string
IncludeRealtimeJson bool
MaxRTMessageSize uint64
Expand Down Expand Up @@ -154,8 +155,13 @@ func (v *Validator) Validate() (*Result, error) {
fvsw, err := dmfr.NewFeedVersionServiceWindowFromReader(reader)
_ = err
result.Timezone = fvsw.DefaultTimezone.Val
tz, _ := time.LoadLocation(result.Timezone)
now := time.Now().In(tz)
tz, err := time.LoadLocation(result.Timezone)
_ = err
now := v.Options.EvaluateAt
if now.IsZero() {
now = time.Now()
}
now = now.In(tz)

// Main validation
cpResult := v.copier.Copy()
Expand Down

0 comments on commit 9af1eb6

Please sign in to comment.