diff options
Diffstat (limited to 'lib/bidding/receive/biddings-receive-columns.tsx')
| -rw-r--r-- | lib/bidding/receive/biddings-receive-columns.tsx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/bidding/receive/biddings-receive-columns.tsx b/lib/bidding/receive/biddings-receive-columns.tsx index ab2c0d02..4bde849c 100644 --- a/lib/bidding/receive/biddings-receive-columns.tsx +++ b/lib/bidding/receive/biddings-receive-columns.tsx @@ -196,13 +196,19 @@ export function getBiddingsReceiveColumns({ setRowAction }: GetColumnsProps): Co if (!startDate || !endDate) return <span className="text-muted-foreground">-</span>
const now = new Date()
- const isActive = now >= new Date(startDate) && now <= new Date(endDate)
- const isPast = now > new Date(endDate)
+ const startObj = new Date(startDate)
+ const endObj = new Date(endDate)
+
+ const isActive = now >= startObj && now <= endObj
+ const isPast = now > endObj
+
+ // UI 표시용 KST 변환
+ const formatKst = (d: Date) => new Date(d.getTime() + 9 * 60 * 60 * 1000).toISOString().slice(0, 16).replace('T', ' ')
return (
<div className="text-xs">
<div className={`${isActive ? 'text-green-600 font-medium' : isPast ? 'text-red-600' : 'text-gray-600'}`}>
- {new Date(startDate).toISOString().slice(0, 16).replace('T', ' ')} ~ {new Date(endDate).toISOString().slice(0, 16).replace('T', ' ')}
+ {formatKst(startObj)} ~ {formatKst(endObj)}
</div>
{isActive && (
<Badge variant="default" className="text-xs mt-1">진행중</Badge>
|
