tracker issue : CF-3228676

select a category, or use search below
(searches all categories and all time range)

lsDateTimeFormat - minute in hour

| View in Tracker

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.

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



Hi Mike, CF10 deprecated timeFormat()'s 'm' mask. Thus, 'n' represents minute in timeFormat/dateTimeFormat/lsDateTimeFormat. Adobe, I see this is marked Open/ToFix. What exactly is the "fix"? Existing behavior is correct. Only "fix" I see necessary is to fix the dateTimeFormat/lsDateTimeFormat docs so that they list all the valid masks. Thanks!, -Aaron
Comment by External U.
18815 | January 29, 2013 12:55:32 AM GMT
This bug exists on all environments. Just mind boggling with how some of these bugs have not been fixed yet.
Vote by External U.
18817 | March 19, 2013 02:10:04 PM GMT
Updated the following pages:
Comment by Frank J.
18816 | January 16, 2014 11:43:23 PM GMT