mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 02:51:46 +00:00
fix(dashboard/anotacoes): corrigir divergência de fuso no formatter de datas
Intl.DateTimeFormat sem timeZone usava o fuso do servidor (UTC) no SSR e o fuso do browser (BRT) no cliente, causando erro de hidratação. Ambos os formatters passam a usar timeZone: "America/Sao_Paulo" explicitamente. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -5,11 +5,13 @@ type NoteTasksSummaryInput = {
|
|||||||
|
|
||||||
const NOTE_CREATED_AT_FORMATTER = new Intl.DateTimeFormat("pt-BR", {
|
const NOTE_CREATED_AT_FORMATTER = new Intl.DateTimeFormat("pt-BR", {
|
||||||
dateStyle: "medium",
|
dateStyle: "medium",
|
||||||
|
timeZone: "America/Sao_Paulo",
|
||||||
});
|
});
|
||||||
|
|
||||||
const NOTE_CREATED_AT_LONG_FORMATTER = new Intl.DateTimeFormat("pt-BR", {
|
const NOTE_CREATED_AT_LONG_FORMATTER = new Intl.DateTimeFormat("pt-BR", {
|
||||||
dateStyle: "long",
|
dateStyle: "long",
|
||||||
timeStyle: "short",
|
timeStyle: "short",
|
||||||
|
timeZone: "America/Sao_Paulo",
|
||||||
});
|
});
|
||||||
|
|
||||||
const parseNoteDate = (value: string | Date | null | undefined) => {
|
const parseNoteDate = (value: string | Date | null | undefined) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user