diff --git a/benchmark/app_test.go b/benchmark/app_test.go index 179c9157..852f1f6a 100644 --- a/benchmark/app_test.go +++ b/benchmark/app_test.go @@ -115,7 +115,7 @@ func GenSequenceOfTxs(b *testing.B, info *AppInfo, msgGen func(*AppInfo, int) ([ msgs, err := msgGen(info, i) require.NoError(b, err) txs[i], err = simtestutil.GenSignedMockTx( - rand.New(rand.NewSource(time.Now().UnixNano())), + rand.New(rand.NewSource(time.Now().UTC().UnixNano())), info.TxConfig, msgs, fees, diff --git a/x/authz/client/cli/tx.go b/x/authz/client/cli/tx.go index 13ea9d88..92c38aab 100644 --- a/x/authz/client/cli/tx.go +++ b/x/authz/client/cli/tx.go @@ -256,7 +256,7 @@ Where authzItems.json contains: cmd.Flags().StringSlice(FlagAllowedValidators, []string{}, "Allowed validators addresses separated by ,") cmd.Flags().StringSlice(FlagDenyValidators, []string{}, "Deny validators addresses separated by ,") cmd.Flags().StringSlice(FlagAllowList, []string{}, "Allowed addresses grantee is allowed to send funds separated by ,") - cmd.Flags().Int64(FlagExpiration, time.Now().AddDate(1, 0, 0).Unix(), "The Unix timestamp. Default is one year.") + cmd.Flags().Int64(FlagExpiration, time.Now().UTC().AddDate(1, 0, 0).Unix(), "The Unix timestamp. Default is one year.") cmd.Flags().String(FlagType, "", "The type of move authorization, {publish|excute}") cmd.Flags().String(FlagItems, "", "The items of move execute authorization, a json file path.") cmd.Flags().String(FlagModules, "", "The items of move publish authorization, a comma-separated string of module names.") diff --git a/x/genutil/gentx_test.go b/x/genutil/gentx_test.go index 8078e212..869b94af 100644 --- a/x/genutil/gentx_test.go +++ b/x/genutil/gentx_test.go @@ -184,7 +184,7 @@ func TestValidateAccountInGenesis(t *testing.T) { // msg := banktypes.NewMsgSend(addr1, addr2, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 1)}) // tx, err := helpers.GenSignedMockTx( -// rand.New(rand.NewSource(time.Now().UnixNano())), +// rand.New(rand.NewSource(time.Now().UTC().UnixNano())), // suite.encodingConfig.TxConfig, // []sdk.Msg{msg}, // sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 10)}, diff --git a/x/gov/keeper/tally_test.go b/x/gov/keeper/tally_test.go index 1be20bab..fa8fab31 100644 --- a/x/gov/keeper/tally_test.go +++ b/x/gov/keeper/tally_test.go @@ -168,7 +168,7 @@ func Test_Tally(t *testing.T) { require.NoError(t, err) // 15 minutes passed - ctx = ctx.WithBlockTime(time.Now().Add(time.Minute * 15)) + ctx = ctx.WithBlockTime(time.Now().UTC().Add(time.Minute * 15)) quorumReached, passed, burnDeposits, tallyResults, err := input.GovKeeper.Tally(ctx, params, proposal) require.NoError(t, err) diff --git a/x/ibc/nft-transfer/client/cli/tx.go b/x/ibc/nft-transfer/client/cli/tx.go index 77da5fb6..1aa5489f 100644 --- a/x/ibc/nft-transfer/client/cli/tx.go +++ b/x/ibc/nft-transfer/client/cli/tx.go @@ -105,7 +105,7 @@ corresponding to the counterpartychannel. Any timeout set to 0 is disabled.`), // use local clock time as reference time if it is later than the // consensus state timestamp of the counter party chain, otherwise // still use consensus state timestamp as reference - now := time.Now().UnixNano() + now := time.Now().UTC().UnixNano() consensusStateTimestamp := consensusState.GetTimestamp() if now > 0 { now := uint64(now)