Skip to content

Commit 861b385

Browse files
committed
fix: use UTC time for packet timeout error
1 parent d5e55b7 commit 861b385

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
@@ -93,7 +93,7 @@ func (k Keeper) SendPacket(
9393
if packet.GetTimeoutTimestamp() != 0 && latestTimestamp >= packet.GetTimeoutTimestamp() {
9494
return 0, errorsmod.Wrapf(
9595
types.ErrPacketTimeout,
96-
"receiving chain block timestamp >= packet timeout timestamp (%s >= %s)", time.Unix(0, int64(latestTimestamp)), time.Unix(0, int64(packet.GetTimeoutTimestamp())),
96+
"receiving chain block timestamp >= packet timeout timestamp (%s >= %s)", time.Unix(0, int64(latestTimestamp)).UTC(), time.Unix(0, int64(packet.GetTimeoutTimestamp())).UTC(),
9797
)
9898
}
9999

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

0 commit comments

Comments
 (0)