FinOpenPOS
API ReferenceFunctions

formatDateTimeBR()

@finopenpos/fiscal / formatDateTimeBR

function formatDateTimeBR(date, stateCode?): string;

Defined in: format-utils.ts:130

Format a Date as ISO 8601 with Brazil timezone offset. SEFAZ rejects UTC "Z" suffix -- requires explicit offset like -03:00.

Uses state-specific offsets for AC (-05:00), AM/RO/MT/MS/RR (-04:00), and -03:00 (Brasilia time) for all other states.

SEFAZ rejeita sufixo UTC "Z" -- requer offset explícito como -03:00.

Usa offsets por estado: AC (-05:00), AM/RO/MT/MS/RR (-04:00), e -03:00 (horário de Brasília) para os demais estados.

Parameters

ParameterTypeDescription

Returns

string

On this page