From c78de56b68cdf87bab297dd03f2bbaf020dc7d27 Mon Sep 17 00:00:00 2001 From: CF Mitrah Date: Mon, 23 Sep 2024 19:27:54 +0530 Subject: [PATCH] Added a fix for LDEV-5093 --- .../main/java/lucee/commons/i18n/FormatUtil.java | 2 ++ test/tickets/LDEV-5093.cfc | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 test/tickets/LDEV-5093.cfc diff --git a/core/src/main/java/lucee/commons/i18n/FormatUtil.java b/core/src/main/java/lucee/commons/i18n/FormatUtil.java index 5b1d41a9f9..bb7aeef41e 100644 --- a/core/src/main/java/lucee/commons/i18n/FormatUtil.java +++ b/core/src/main/java/lucee/commons/i18n/FormatUtil.java @@ -104,6 +104,8 @@ public class FormatUtil { "EEE MMM dd yyyy HH:mm:ss 'GMT'ZZ (z)", + "EEE MMM dd yyyy HH:mm:ss 'GMT'ZZ (zzzz)", + "yyyy/MM/dd HH:mm:ss zz", "yyyy-MM-dd HH:mm:ss zz" diff --git a/test/tickets/LDEV-5093.cfc b/test/tickets/LDEV-5093.cfc new file mode 100644 index 0000000000..3af857db68 --- /dev/null +++ b/test/tickets/LDEV-5093.cfc @@ -0,0 +1,13 @@ +component extends = "org.lucee.cfml.test.LuceeTestCase" { + function run( testResults, testBox ){ + describe( "Test LDEV-5093", function(){ + it( "test EEE MMM dd yyyy HH:mm:ss 'GMT'ZZ (zzzz)", function(){ + var dateTime = "Mon Sep 23 2024 16:36:28 GMT+0530 (India Standard Time)"; + var result = isDate(ParseDateTime(dateTime)); + + expect( result ).toBeTrue(); + expect( dateTimeFormat(dateTime,"zzzz") ).toBe( "india Standard Time" ); + }); + } ); + } +} \ No newline at end of file