Skip to content

Commit e1fbc8a

Browse files
committed
fix format bug
1 parent 213c855 commit e1fbc8a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/lib/buy.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,9 @@ function confirmPlaceOrderMessage(options: BuyOptions) {
293293
timeDescription = `from ${startAtLabel} (${c.green(fromNowTime)}) until ${endsAtLabel}`;
294294
}
295295

296-
const durationInSeconds =
297-
options.endsAt.getTime() / 1000 - options.startsAt.getTime() / 1000;
296+
const durationInSeconds = Math.ceil(
297+
(options.endsAt.getTime() - options.startsAt.getTime()) / 1000,
298+
);
298299
const pricePerGPUHour = totalPriceToPricePerGPUHour(
299300
options.priceCenticents,
300301
durationInSeconds,

0 commit comments

Comments
 (0)