Skip to content

Commit

Permalink
Corrige datas nas gerações de documentos
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-santana committed Jul 7, 2019
1 parent 74fe119 commit 2de6b0b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion server/controllers/defenses/TccGenerate.js
Expand Up @@ -49,6 +49,7 @@ module.exports = async function generateAllDocs(ctx) {
}
const defenseDate = defenseFind.get('date')
const date = new Date()
date.setHours(date.getHours() - 3)
const dados = {
curso: utils.translate(defenseFind.get('course')),
tituloTCC: defenseFind.get('title'),
Expand All @@ -67,7 +68,7 @@ module.exports = async function generateAllDocs(ctx) {
mesDefesa: utils.translate(Number(defenseDate.split('/')[1])),
anoDefesa: defenseDate.split('/')[2],
dia: date.getUTCDate(),
mes: utils.translate(date.getUTCMonth()),
mes: utils.translate(date.getUTCMonth() + 1),
ano: date.getUTCFullYear(),
tituloDiretor: 'Prof(a). ',
diretor: 'NÃO ENCONTRADO NAS CONFIGURAÇÕES!',
Expand Down
3 changes: 2 additions & 1 deletion server/controllers/students/AttendanceRegister.js
Expand Up @@ -26,9 +26,10 @@ module.exports = async function generateAttendanceRegister(ctx) {
studentList = students.map(student => student.get('name'), [])
}
const today = new Date()
today.setHours(today.getHours() - 3)
const data = {
dia: today.getUTCDate(),
mes: utils.translate(today.getUTCMonth()),
mes: utils.translate(today.getUTCMonth() + 1),
ano: today.getUTCFullYear(),
nomeDosAlunos: studentList,
curso:
Expand Down
3 changes: 2 additions & 1 deletion server/controllers/students/ConcludingCertificate.js
Expand Up @@ -33,9 +33,10 @@ module.exports = async function generateConcludingCertificate(ctx) {
return
}
const today = new Date()
today.setHours(today.getHours() - 3)
const data = {
dia: today.getUTCDate(),
mes: utils.translate(today.getUTCMonth()),
mes: utils.translate(today.getUTCMonth() + 1),
ano: today.getUTCFullYear(),
curso:
studentFind.get('course') === 'cbcc'
Expand Down

0 comments on commit 2de6b0b

Please sign in to comment.