Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2021-1-capstone-design1
/
RIT_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
박권수
2021-09-15 20:59:44 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e5332f11b1d8ea1b0e06f8d2b7121c433fdacb3d
e5332f11
1 parent
3e4b1496
feat. moment timezone : seoul
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
server/package.json
server/src/models/patientInfo.js
server/yarn.lock
server/package.json
View file @
e5332f1
...
...
@@ -19,6 +19,7 @@
"dependencies"
:
{
"@koa/cors"
:
"^3.1.0"
,
"moment"
:
"^2.29.1"
,
"moment-timezone"
:
"^0.5.33"
,
"mqtt"
:
"^4.2.6"
,
"node-cron"
:
"^3.0.0"
},
...
...
server/src/models/patientInfo.js
View file @
e5332f1
const
mongoose
=
require
(
'mongoose'
);
const
moment
=
require
(
'moment'
);
require
(
'moment-timezone'
);
const
Schema
=
mongoose
.
Schema
;
...
...
@@ -35,9 +36,9 @@ PatientInfoSchema.methods.setUseYn = function(useYn) {
};
PatientInfoSchema
.
methods
.
updateInfo
=
function
(
info
)
{
const
date
=
moment
(
new
Date
()).
format
(
'YYYY-MM-DD hh
:mm'
);
const
date
=
moment
.
tz
(
'Asia/Seoul'
).
format
(
'YYYY-MM-DD HH
:mm'
);
if
(
this
.
info
.
length
)
this
.
info
=
this
.
info
.
concat
(
'\n\n'
,
`
${
date
}
➡
${
info
}
`
);
this
.
info
=
this
.
info
.
concat
(
'\n\n'
,
`
${
date
}
->
${
info
}
`
);
else
this
.
info
=
`
${
date
}
➡
${
info
}
`
;
};
...
...
server/yarn.lock
View file @
e5332f1
...
...
@@ -725,7 +725,7 @@ minimist@^1.1.0, minimist@^1.2.5:
resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz"
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
moment-timezone@^0.5.31:
moment-timezone@^0.5.31
, moment-timezone@^0.5.33
:
version "0.5.33"
resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.33.tgz#b252fd6bb57f341c9b59a5ab61a8e51a73bbd22c"
integrity sha512-PTc2vcT8K9J5/9rDEPe5czSIKgLoGsH8UNpA4qZTVw0Vd/Uz19geE9abbIOQKaAQFcnQ3v5YEXrbSc5BpshH+w==
...
...
Please
register
or
login
to post a comment