Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging #4

Merged
merged 2 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ RUN \
FROM base AS runner
WORKDIR /app

RUN apk add --no-cache tzdata
ENV TZ=America/Sao_Paulo

ENV NODE_ENV production
# Uncomment the following line in case you want to disable telemetry during runtime.
# ENV NEXT_TELEMETRY_DISABLED 1
Expand All @@ -64,4 +67,4 @@ ENV PORT 3000

# server.js is created by next build from the standalone output
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
CMD HOSTNAME="0.0.0.0" node server.js
CMD HOSTNAME="0.0.0.0" node server.js
10 changes: 4 additions & 6 deletions src/app/(app)/vision-ai/project/[id]/actions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use server'

import {} from 'date-fns'
import { cookies } from 'next/headers'
import { redirect } from 'next/navigation'

Expand Down Expand Up @@ -47,13 +48,10 @@ export async function updateProjectAction(props: UpdateProject) {

export async function formatCurrentDateTime(time: string) {
const today = new Date()
today.setHours(0, 0, 0, 0)

const splited = time.split(':')
const utcTodayWithTimeStr = `${today.toISOString().split('T')[0]}T${time}`

const hour = parseInt(splited[0]) - 3 // Converte para o horário de Brasília
const minute = parseInt(splited[1])
const newDate = new Date(utcTodayWithTimeStr)

today.setHours(hour, minute)
return today
return newDate
}
Loading