Toggle navigation
Toggle navigation
This project
Loading...
Sign in
최은석
/
ossw-project
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
최은석
2022-06-08 01:28:13 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
1fca758c1451e0609b00107552fa36e7b924f599
1fca758c
2 parents
88cf141d
f4afdc18
Merge branch 'back' of
http://khuhub.khu.ac.kr/2021105655/ossw-project
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
server/Router/api.js
server/Router/api.js
View file @
1fca758
...
...
@@ -35,9 +35,17 @@ const waitingModel = mongoose.model('waiting', waiting);
// res.send({ test: "hi" });
// });
function
getKSTDate
(){
const
curr
=
new
Date
();
const
utc
=
curr
.
getTime
()
+
(
curr
.
getTimezoneOffset
()
*
60
*
1000
);
const
KR_TIME_DIFF
=
9
*
60
*
60
*
1000
;
const
kr_curr
=
new
Date
(
utc
+
(
KR_TIME_DIFF
));
return
kr_curr
;
}
function
getCurrentDate
(
originDate
)
{
var
date
;
if
(
originDate
==
null
)
date
=
new
Date
();
if
(
originDate
==
null
)
date
=
getKST
Date
();
else
date
=
new
Date
(
originDate
);
var
year
=
date
.
getFullYear
().
toString
();
...
...
@@ -51,7 +59,7 @@ function getCurrentDate(originDate) {
}
function
getCurrentTime
()
{
var
date
=
new
Date
();
var
date
=
new
getKST
Date
();
var
hour
=
date
.
getHours
();
hour
=
hour
<
10
?
'0'
+
hour
.
toString
()
:
hour
.
toString
();
...
...
Please
register
or
login
to post a comment