Skip to content

Commit 84dca76

Browse files
mergify[bot]GAtom22crodriguezvega
authored
fix: use UTC time for packet timeout error (backport #4476) (#4497)
* fix: use UTC time for packet timeout error (#4476) (cherry picked from commit 674d832) * add changelog --------- Co-authored-by: Tom <54514587+GAtom22@users.noreply.github.com> Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
1 parent db4ec13 commit 84dca76

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
5858

5959
### Bug Fixes
6060

61+
* (04-channel) [\#4476](https://github.com/cosmos/ibc-go/pull/4476) Use UTC time in log messages for packet timeout error.
62+
6163
## [v7.2.0](https://github.com/cosmos/ibc-go/releases/tag/v7.2.0) - 2023-06-22
6264

6365
### Dependencies

modules/core/04-channel/keeper/packet.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func (k Keeper) SendPacket(
9292
if packet.GetTimeoutTimestamp() != 0 && latestTimestamp >= packet.GetTimeoutTimestamp() {
9393
return 0, sdkerrors.Wrapf(
9494
types.ErrPacketTimeout,
95-
"receiving chain block timestamp >= packet timeout timestamp (%s >= %s)", time.Unix(0, int64(latestTimestamp)), time.Unix(0, int64(packet.GetTimeoutTimestamp())),
95+
"receiving chain block timestamp >= packet timeout timestamp (%s >= %s)", time.Unix(0, int64(latestTimestamp)).UTC(), time.Unix(0, int64(packet.GetTimeoutTimestamp())).UTC(),
9696
)
9797
}
9898

@@ -189,7 +189,7 @@ func (k Keeper) RecvPacket(
189189
if packet.GetTimeoutTimestamp() != 0 && uint64(ctx.BlockTime().UnixNano()) >= packet.GetTimeoutTimestamp() {
190190
return sdkerrors.Wrapf(
191191
types.ErrPacketTimeout,
192-
"block timestamp >= packet timeout timestamp (%s >= %s)", ctx.BlockTime(), time.Unix(0, int64(packet.GetTimeoutTimestamp())),
192+
"block timestamp >= packet timeout timestamp (%s >= %s)", ctx.BlockTime(), time.Unix(0, int64(packet.GetTimeoutTimestamp())).UTC(),
193193
)
194194
}
195195

0 commit comments

Comments
 (0)