diff --git a/Dockerfile b/Dockerfile index d3ae1fd..dbacf51 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ FROM node:18-alpine AS builder WORKDIR /app -RUN apk add --no-cache python3 make g++ +RUN apk add --no-cache python3 make g++ tzdata COPY package*.json ./ RUN npm ci @@ -25,8 +25,11 @@ FROM node:18-alpine AS runner WORKDIR /app +RUN apk add --no-cache tzdata + ENV NODE_ENV=production ENV PORT=3000 +ENV TZ=Europe/Istanbul COPY package*.json ./ COPY --from=builder /app/node_modules ./node_modules diff --git a/docker-compose.yml b/docker-compose.yml index 06c6613..76766e6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,6 +9,7 @@ services: restart: unless-stopped environment: - PORT=3000 + - TZ=Europe/Istanbul - SESSION_SECRET=${SESSION_SECRET:-} - ENCRYPTION_SECRET=${ENCRYPTION_SECRET:-} - NODE_ENV=production diff --git a/public/js/exams.js b/public/js/exams.js index d0ac813..106d5ba 100644 --- a/public/js/exams.js +++ b/public/js/exams.js @@ -435,6 +435,7 @@ document.addEventListener('DOMContentLoaded', () => { const isWrong = q.status === 'wrong'; const studentClass = isWrong ? 'answer-student-wrong' : 'answer-student-empty'; const studentText = isWrong ? q.studentAnswer : t('exams.emptyAnswerText'); + const imgSrc = toProxiedImageUrl(q.imageUrl); html += `
<%= t('exams.subtitle') %> <% if (lastSynced) { %> - • <%= t('exams.syncedLabel') %> <%= new Date(lastSynced).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }) %> + • <%= t('exams.syncedLabel') %> <%= formatTime(lastSynced) %> <% } %>
diff --git a/views/partials/header.ejs b/views/partials/header.ejs index 915458e..3ec7724 100644 --- a/views/partials/header.ejs +++ b/views/partials/header.ejs @@ -59,10 +59,10 @@ <% if (typeof studentId !== 'undefined' && studentId) { %> <% } %> diff --git a/views/private-lessons.ejs b/views/private-lessons.ejs index 6dc4fbe..2f3cdf9 100644 --- a/views/private-lessons.ejs +++ b/views/private-lessons.ejs @@ -8,7 +8,7 @@<%= t('privateLessons.subtitle') %> <% if (lastSynced) { %> - • <%= t('privateLessons.syncedLabel') %> <%= new Date(lastSynced).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }) %> + • <%= t('privateLessons.syncedLabel') %> <%= formatTime(lastSynced) %> <% } %>
@@ -27,7 +27,7 @@