'ORA-01852: 초는 0에서 59 사이여야 합니다.' 에러

Joy🌱·2023년 5월 25일
0

🌟 Trouble Shooting

목록 보기
9/17
post-thumbnail

❓ 문제 발생

퇴근 시간 기록 시, 불규칙적인 빈도로
Cannot read properties of undefined (reading 'status')
TypeError: Cannot read properties of undefined (reading 'status')
오류가 뜨면서 Back 콘솔에 ORA-01852: 초는 0에서 59 사이여야 합니다.라는 오류 발생


✅ 해결

LocalDateTime.now()로 받아온 현재 시간을 DateTimeFormatter로 포맷하는 것이 아닌 now()를 DB타입에 맞춰 Timestamp로 변경한 뒤 SimpleDateFormat으로 포맷하면 정상적으로 동작

Before

After

profile
Tiny little habits make me

0개의 댓글