cDateTimeAccepted timestamp text.
AdvPL GuideFwDateTimeToLocal(cDateTime, [nVerao]) --> aDateTimeConverts a timestamp string to local date/time.
Accepts W3C ISO 8601/RFC 3339 formats and returns local date/time in two positions. Z or an offset contributes to the instant; do not merely strip it. nVerao accepts 1/0; defaults depend on MV_HVERAO in an open environment. The example explicitly uses zero without promising a fixed time in an unknown timezone. (Sources: refs. 1–1.)
FwDateTimeToLocal(cDateTime, [nVerao]) --> aDateTimecDateTimeAccepted timestamp text.
nVerao1 with daylight saving, 0 without.
[1] date; [2] time text.
#Include "Protheus.ch"
User Function Ed415()
Local aLocal := FwDateTimeToLocal("2026-10-26T12:00:00Z",0)
// Environment timezone determines conversion.
ConOut(cValToChar(Len(aLocal)))
Return NilTwo-element array with environment-local date and time. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.