Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Mike Causer / Mike Causer (mike causer)
Created: 07/02/2012
Components: Documentation
Versions: 10.0
Failure Type: Data Corruption
Found In Build/Fixed In Build: Final /
Priority/Frequency: Critical / All users will encounter
Locale/System: English / Mac 10.7 64-bit
Vote Count: 1
Problem Description: In the mask the 'm' (minute in hour) is getting confused with 'M' (month in year).
Steps to Reproduce: LSDateTimeFormat( now(), "yyyy-MM-dd HH:mm:ss z" );
Actual Result: 2012-07-03 11:07:23 EST
Expected Result: 2012-07-03 11:15:23 EST
Any Workarounds: LSDateTimeFormat( now(), "yyyy-MM-dd HH:nn:ss z" );
Using 'n' in place of 'm' for minutes returns the correct 'minute in hour' value.
But this should not work.
The docs says it uses a SimpleDateFormat compatible mask.
ie.
http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html
If you call createObject( "java", "java.text.SimpleDateFormat" ).init( "yyyy-MM-dd HH:mm:ss z" ).format( now() );
It correctly gives you 2012-07-03 11:15:23 EST - great!
If you call createObject( "java", "java.text.SimpleDateFormat" ).init( "yyyy-MM-dd HH:nn:ss z" ).format( now() );
It throws an error.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3228676
Deployment Phase: Release Candidate
External Customer Info:
External Company:
External Customer Name: mike causer
External Customer Email:
External Test Config: My Hardware and Environment details: Mac OSX Lion, ColdFusion 10,282462
Attachments:
Comments: