Copy link to clipboard
Copied
Hi @Imidi ,
What you observe is unlikely to be a bug. The likely explanation is that your code contains some ambiguity:
LSdateformat(qActivitate.Datetime)
is a locale-based function. Ye
Copy link to clipboard
Copied
See if this is resolved by a bug fix offered by Adobe at the ticket (and as discussed in my last couple of comments there):
https://tracker.adobe.com/#/view/CF-4211276
Please let us know here if it helps, or not.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Please confirm what steps you took.
Copy link to clipboard
Copied
Hi @Imidi ,
What you observe is unlikely to be a bug. The likely explanation is that your code contains some ambiguity:
LSdateformat(qActivitate.Datetime)
is a locale-based function. Yet it fails to mention the mask and the locale. ColdFusion is therefore forced to use default values for mask and locale, which may be incompatible with the value 2022-04-06T19:27:24. For details, see the LSDateFormat documentation.
// Create a date object earlier in the code.
<cfset datetimeObject=parseDateTime(qActivitate.Datetime)>
// Subsequently...
// Using an explicit Locale (Spain/Spanish, for example)
lsdateformat(date=datetimeObject, mask="yyyy-mm-dd", locale="es_ES")
// Using the locale with which the ColdFusion server is configured
lsdateformat(date=datetimeObject, mask="yyyy-mm-dd")
// Avoiding specifying the locale
dateformat(date=datetimeObject, mask="yyyy-mm-dd")
Copy link to clipboard
Copied
Thanks BKBK! Your code is a solution. The problem is with the inconsistency between Coldfusion10 and the following. The text: "2022-04-06 19:27:24" from the base date is indeed: "2022-04-06T19: 27: 24" , but the format in cfinput value: "#LSdateformat (my) # #LStimeformat (my, ' HH: mm: ss') # " should have reproduced the text in the database as Coldfusion 10 does! They managed to make, the commonplace "cfdump", unusable when it comes to DateTime. As an amateur, I play Coldfusion to keep my brain healthy! I don't want to think about the problems a network administrator faces ... Thanks again and good luck.
Copy link to clipboard
Copied
As an amateur, I play Coldfusion to keep my brain healthy!
By @Imidi
Thanks to you, too.
That is one of the most poetic things I've heard anyone say about ColdFusion. 🙂