harryk
08/01/2024, 10:03 AM<cfoutput>#DateTimeFormat("31.07.2024", "yyyy-MM-dd'T'HH:nn:ss'Z'", "GMT")#</cfoutput>
returns: 2024-07-31T000000Z
(in Lucee and ACF)
But on my machine it returns
2024-07-30T220000Z
Does somebody know the reason? Is there another method (maybe using Java) to format Dates like
31.07.2024 (german), 07/31/2024 (english), 31/07/2024 (french) in the format "yyyy-MM-dd'T'HHnnss'Z'"?
Using
<cfoutput>#LsDateTimeFormat("31.07.2024", "yyyy-MM-dd'T'HH:nn:ss'Z'", "German (Standard)", "GMT")#</cfoutput>
doesn't work too an my machine, but works on trycfaliaspooryorik
doesn't work too an my machine, but works on trycf
aliaspooryorik
harryk
08/01/2024, 10:05 AMharryk
08/01/2024, 10:06 AMaliaspooryorik
aliaspooryorik
<cfset mydate = createDateTime( 2024, 07, 31, 12, 11, 10, 09 )>
<cfoutput>
#LsDateTimeFormat(mydate, "yyyy-MM-dd'T'HH:nn:ss'Z'", "German (Standard)", "GMT")#
</cfoutput>
harryk
08/01/2024, 10:12 AMharryk
08/01/2024, 10:13 AMaliaspooryorik
denny
08/01/2024, 10:17 AMInstant
yet?aliaspooryorik
aliaspooryorik
1/2/2024
is that 1st of Feb or 2nd of Jan? I mean obviously any reasonable person would see that as 1st of Feb in the year 2024 but hey ho 😁denny
08/01/2024, 10:24 AMyyyy-mm-dd
ftw!denny
08/01/2024, 10:25 AMNearly all of your backend, database, business logic, data persistence, data exchange should all be in UTC. But for presentation to users you need to adjust into a time zone expected by the user. This is the purpose of theclass and the formatter classes used to generate String representations of those date-time values.ZonedDateTime
denny
08/01/2024, 10:25 AMaliaspooryorik