Skip to content

Commit

Permalink
fix --timezone default value (#31)
Browse files Browse the repository at this point in the history
--timezone was using as a default value "utc" however the expected value
for LoadLocation was in uppercase.

See: https://github.com/golang/go/blob/f09db2bb9331f4b31afb867173b1773e6494af27/src/time/zoneinfo.go#L667
  • Loading branch information
pacop authored Nov 3, 2023
1 parent 908b104 commit c59c176
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func NewScriptCmd() *cobra.Command {
cmd.Flags().StringP("driver", "d", "", "the driver to use.")
cmd.Flags().BoolP("timestamp", "t", false, "a timestamp prefix will be added to migration file if set.")
cmd.Flags().StringP("timeformat", "f", "unix", "timestamp format to be used for timestamps.")
cmd.Flags().StringP("timezone", "z", "utc", "time zone to be used for timestamps.")
cmd.Flags().StringP("timezone", "z", "UTC", "time zone to be used for timestamps.")
cmd.Flags().BoolP("sequence", "s", false, "a sequence number prefix will be added to migration file if set.")
_ = cmd.MarkFlagRequired("driver")

Expand All @@ -78,7 +78,7 @@ func NewGenerateCmd() *cobra.Command {
cmd.Flags().StringP("driver", "d", "", "the driver to use.")
cmd.Flags().BoolP("timestamp", "t", false, "a timestamp prefix will be added to migration file if set.")
cmd.Flags().StringP("timeformat", "f", "unix", "timestamp format to be used for timestamps.")
cmd.Flags().StringP("timezone", "z", "utc", "time zone to be used for timestamps.")
cmd.Flags().StringP("timezone", "z", "UTC", "time zone to be used for timestamps.")
cmd.Flags().BoolP("sequence", "s", false, "a sequence number prefix will be added to migration file if set.")
_ = cmd.MarkFlagRequired("driver")

Expand Down

0 comments on commit c59c176

Please sign in to comment.