박지환

Fix time set error

...@@ -33,7 +33,6 @@ app.use(static(__dirname)); ...@@ -33,7 +33,6 @@ app.use(static(__dirname));
33 // To get today date by using Date 33 // To get today date by using Date
34 function getTodayDate() { 34 function getTodayDate() {
35 const tempDate = new Date(); 35 const tempDate = new Date();
36 - console.log(tempDate.getTimezoneOffset());
37 const utc = tempDate.getTime() + tempDate.getTimezoneOffset() * 60 * 1000; 36 const utc = tempDate.getTime() + tempDate.getTimezoneOffset() * 60 * 1000;
38 const KR_TIME_DIFF = 9 * 60 * 60 * 1000; 37 const KR_TIME_DIFF = 9 * 60 * 60 * 1000;
39 const today = new Date(utc + KR_TIME_DIFF); 38 const today = new Date(utc + KR_TIME_DIFF);
...@@ -41,15 +40,6 @@ function getTodayDate() { ...@@ -41,15 +40,6 @@ function getTodayDate() {
41 var month = ("0" + (today.getMonth() + 1)).slice(-2); 40 var month = ("0" + (today.getMonth() + 1)).slice(-2);
42 var day = ("0" + today.getDate()).slice(-2); 41 var day = ("0" + today.getDate()).slice(-2);
43 var dateString = year + "-" + month + "-" + day; 42 var dateString = year + "-" + month + "-" + day;
44 - console.log(
45 - dateString +
46 - "-" +
47 - today.getHours() +
48 - "-" +
49 - today.getMinutes() +
50 - "-" +
51 - today.getSeconds()
52 - );
53 // return "2022-12-25"; // 테스트용 날짜를 입력하세요. *** 테스트가 끝나면 주석처리하고 커밋해주세요. *** ex) 2022-09-12, 2022-09-15, 2022-10-04 43 // return "2022-12-25"; // 테스트용 날짜를 입력하세요. *** 테스트가 끝나면 주석처리하고 커밋해주세요. *** ex) 2022-09-12, 2022-09-15, 2022-10-04
54 return dateString; 44 return dateString;
55 } 45 }
......