[Looking for Charlie's main web site?]

Hotfix released for CF2021 date-mask compatibility issue

Note: This blog post is from 2020. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
Good news to share: if you're concerned about being impacted by a pressing compatibility issue in ColdFusion 2021 (regarding using "D" in a dateformat mask), Adobe released a fix for the problem last week. There are 3 simple steps to implementing that fix, one of which is a JVM arg change to that YOU MUST MAKE--even with the "fix" in place--if you want to revert the behavior.

Or you can change your CFML code to get around the problem, as I also discuss below.

[Update: As of Mar 2021, Adobe now offers this "hotfix" as of CF2021 Update 1. You still need to add the JVM arg discussed, if you want to do that:

-Dcoldfusion.datemask.useDasdayofmonth=true

Again, while no longer need to obtain and implement the hotfix jar file itself, the update does NOT change the DEFAULT behavior, which is why that JVM arg is still necessary. The rest of the information below applies.]

Read on for additional details.

[....Continue Reading....]

Comments
Hi Charlie. I went the former route by applying the jvm argument update in the Administrator itself (rather than within the jvm.config file). If I'm looking at things correctly in the file system, CF Admin made a backup of (jvm.bak) upon applying this config change in the admin. Can you confirm?
Andy, yes, the cf admin always makes backup of the file as well, but my point in suggesting the alternative of editing and backing up the file was that:

a) a typical user of the cf admin would not readily know what and where these files are

b) so if they made a mistake that would keep cf from coming up, they'd not be able get to the admin to see/revert their mistake

c) also, the backup the admin makes is one that gets overridden by a subsequent update. By making their own backup, one would likely choose a different name that would not get lost by that automated backup

Still, I appreciate your checking in for more clarity. Hope that's helpful.
Hi Charlie, just upgraded from 2018 to 2023 and this was a life-saver!
# Posted By Paul Durrant | 8/25/23 10:50 AM
Thanks Paul. Yep, this problem (and solution) will remain significant for years to come, as people transition to cf2021 or later from any previous version.

Fwiw, I also have a preso I migrating to cf2021, which would benefit folks moving to 2023 (or beyond) as well, at carehart.org/presentations.
Copyright ©2025 Charlie Arehart
Carehart Logo
BlogCFC was created by Raymond Camden. This blog is running version 5.005.
(Want to validate the HTML in this page?)

Managed Hosting Services provided by
Managed Dedicated Hosting