Skip to content

Commit

Permalink
changed quiz globalStartDate format to be more exact
Browse files Browse the repository at this point in the history
  • Loading branch information
ice-ares committed Feb 5, 2024
1 parent 79dde58 commit d3c2db6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ kyc/quiz:
maxResetCount: 0
maxAttemptsAllowed: 3
availabilityWindowSeconds: 600
globalStartDate: 2024-01-01
globalStartDate: 2024-02-03T16:20:52.156534Z
auth/email-link:
wintr/connectors/storage/v2: *db
fromEmailAddress: [email protected]
Expand Down
2 changes: 1 addition & 1 deletion kyc/quiz/.testdata/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ kyc/quiz:
maxResetCount: 2
maxAttemptsAllowed: 3
availabilityWindowSeconds: 604800
globalStartDate: 2024-01-01
globalStartDate: 2024-02-03T16:20:52.156534Z
2 changes: 1 addition & 1 deletion kyc/quiz/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ type (
globalStartDate *time.Time
ConfigJSONURL string `yaml:"config-json-url" mapstructure:"config-json-url"` //nolint:tagliatelle // .
MaxResetCount *uint8 `yaml:"maxResetCount"`
GlobalStartDate string `yaml:"globalStartDate" example:"YYYY-MM-DD"` //nolint:revive // .
GlobalStartDate string `yaml:"globalStartDate" example:"2022-01-03T16:20:52.156534Z"` //nolint:revive // .
Environment string `yaml:"environment" mapstructure:"environment"`
AlertSlackWebhook string `yaml:"alert-slack-webhook" mapstructure:"alert-slack-webhook"` //nolint:tagliatelle // .
AvailabilityWindowSeconds int `yaml:"availabilityWindowSeconds"`
Expand Down
2 changes: 1 addition & 1 deletion kyc/quiz/quiz.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func mustLoadConfig() config { //nolint:funlen // .
if cfg.GlobalStartDate == "" {
panic("globalStartDate is not set")
}
globalStartDate, err := stdlibtime.ParseInLocation(stdlibtime.DateOnly, cfg.GlobalStartDate, stdlibtime.UTC)
globalStartDate, err := stdlibtime.ParseInLocation(stdlibtime.RFC3339Nano, cfg.GlobalStartDate, stdlibtime.UTC)
log.Panic(err) //nolint:revive // .
cfg.globalStartDate = time.New(globalStartDate)

Expand Down

0 comments on commit d3c2db6

Please sign in to comment.