My Lucee version is Lucee 5.3.9.160 - Overview. I ...
# lucee
w
My Lucee version is Lucee 5.3.9.160 - Overview. I have an issue with the serializeJson. using database MySQL and table have a column with date time. When I do select datetime_col from the table and cfdump the results, the data is correct. Which is “{ts ‘2023-08-23 235325’}” Problem: The actual problem is when I serializeJson(data,‘struct’) - this convert the datatime_col to json like STARTDATETIME: “August, 23 2023 235325 +0500". We don’t need +0500 at the end. Why it is adding +0500 at the end? I see others have same problem https://dev.lucee.org/t/serializejson-and-datetime/7887 Can you please suggest a solution to it. How to get the date without 0500?
s
The least bad solution to this is Denny's answer regarding an array of structs. Use returnFormat or QB instead of a query object for more control over the date object and serialize that. There are also ways to get it to serialize to something more sane than
Month, Day Year hh:mm:ss