Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): John Whish / John Whish (John Whish)
Created: 06/30/2015
Components: Core Runtime
Versions: 10.0
Failure Type:
Found In Build/Fixed In Build: Final /
Priority/Frequency: Normal / Unknown
Locale/System: English / Platforms All
Vote Count: 4
Problem Description:
LSDateFormat and DateFormat parse date strings differently. They should be consistent. Have search bugbase and not found the issue reported previously.
Steps to Reproduce:
<cfscript>
foo = "{ts '2015-01-09 15:15:39'}";
writeDump(isDate(foo)); // true
writeDump(DateFormat(foo, "yyyy-mm-dd")); // 2015-01-09
writeDump(LSDateFormat(foo, "yyyy-mm-dd")); // error
</cfscript>
Actual Result:
LSDateFormat(foo, "yyyy-mm-dd")) returns:
{ts '2015-06-30 16:16:31'} is an invalid date format
Expected Result:
I would expect it to work the same for all 3 functions. Either it's a date value that can be parsed or not. It shouldn't only error on LSDateFormat.
Any Workarounds:
use parseDateTime("{ts '2015-06-30 16:16:31'}")
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4014660
External Customer Info:
External Company:
External Customer Name: John
External Customer Email:
External Test Config: My Hardware and Environment details:
Tested on ColdFusion 10 and 11
http://trycf.com/gist/7fff5b302cce0cc9a055/acf11?theme=monokai
First seen on ColdFusion 10 Mac OSX
Attachments:
Comments: