Skip to content

Commit ec70e62

Browse files
fix: use UTC time for packet timeout error (#4476) (#4496)
(cherry picked from commit 674d832) Co-authored-by: Tom <54514587+GAtom22@users.noreply.github.com>
1 parent 9403a8b commit ec70e62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)