File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
frontend/src/pages/generation Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ const Attendance = () => {
111
111
112
112
if ( ! userId ) return ;
113
113
114
- const today = new Date ( ) . toISOString ( ) . split ( "T" ) [ 0 ] ; // YYYY-MM-DD
114
+ const today = new Date ( ) . toLocaleDateString ( "sv-SE" ) ; // → KST(한국 시간 기준)
115
115
const res = await api . get ( `/attendance/user/date` , {
116
116
params : { userId, date : today } ,
117
117
withCredentials : true , // 세션 기반 인증 요청처리
@@ -139,7 +139,7 @@ const Attendance = () => {
139
139
140
140
useEffect ( ( ) => {
141
141
if ( ! currentDateRef . current ) {
142
- currentDateRef . current = new Date ( ) . toISOString ( ) . split ( "T" ) [ 0 ] ;
142
+ currentDateRef . current = new Date ( ) . toLocaleDateString ( "sv-SE" ) ; // → KST(한국 시간 기준)
143
143
}
144
144
console . log ( "currentDateRef 할당 갱신:" , currentDateRef . current ) ;
145
145
@@ -159,7 +159,7 @@ const Attendance = () => {
159
159
160
160
// 매 분마다 현재 날짜를 확인해서 달라졌으면 상태 업데이트
161
161
const dateCheckInterval = setInterval ( ( ) => {
162
- const todayStr = new Date ( ) . toISOString ( ) . split ( "T" ) [ 0 ] ;
162
+ const todayStr = new Date ( ) . toLocaleDateString ( "sv-SE" ) ; // → KST(한국 시간 기준)
163
163
console . log ( "dateCheckInterval 실행됨 / 현재 시간:" , new Date ( ) ) ;
164
164
console . log (
165
165
"currentDateRef:" ,
You can’t perform that action at this time.
0 commit comments