From fd1cbca5352efa03f7c5e3d92501154788f62237 Mon Sep 17 00:00:00 2001 From: jxy_git Date: Mon, 18 Nov 2024 17:31:31 +0800 Subject: [PATCH] Fix leading zero issue with date formatting (cherry picked from commit 2d59c5b259638bd57e5ec6bb41349273ad0123df) --- ...ng-zero-use-case-for-date-formatting.patch | 34 +++++++++++++++++++ ovirt-engine-ui-extensions.spec | 13 ++++--- 2 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 0001-Update-leading-zero-use-case-for-date-formatting.patch diff --git a/0001-Update-leading-zero-use-case-for-date-formatting.patch b/0001-Update-leading-zero-use-case-for-date-formatting.patch new file mode 100644 index 0000000..a842c6e --- /dev/null +++ b/0001-Update-leading-zero-use-case-for-date-formatting.patch @@ -0,0 +1,34 @@ +From c3099f1dbf0dd83bdca443dab55b310ea8efc040 Mon Sep 17 00:00:00 2001 +From: jxy_git +Date: Mon, 18 Nov 2024 17:21:12 +0800 +Subject: [PATCH] Update leading zero use case for date formatting + +--- + src/utils/intl-test.js | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/utils/intl-test.js b/src/utils/intl-test.js +index 40d422f..520a771 100644 +--- a/src/utils/intl-test.js ++++ b/src/utils/intl-test.js +@@ -180,7 +180,7 @@ describe('DateTime Formatters', function () { + expect(currentTimeZone()).toBe('UTC') + + expect(formatDate(new Date(Date.UTC(1999, 11, 31)))).toBe('31/12/1999') +- expect(formatDate(new Date(Date.UTC(2020, 6, 4)))).toBe('4/7/2020') ++ expect(formatDate(new Date(Date.UTC(2020, 6, 4)))).toBe('04/07/2020') + }) + it('format datetime', function () { + initLocale('it-IT') +@@ -188,7 +188,7 @@ describe('DateTime Formatters', function () { + const utcTzName = extractUtcTimezoneName(currentLocale()) + + expect(formatDateTime(new Date(Date.UTC(1999, 11, 31, 16, 35, 42)))).toBe(`31/12/1999, 16:35:42 ${utcTzName}`) +- expect(formatDateTime(new Date(Date.UTC(2020, 6, 4, 11, 12, 13)))).toBe(`4/7/2020, 11:12:13 ${utcTzName}`) ++ expect(formatDateTime(new Date(Date.UTC(2020, 6, 4, 11, 12, 13)))).toBe(`04/07/2020, 11:12:13 ${utcTzName}`) + }) + }) + } +-- +2.43.0 + diff --git a/ovirt-engine-ui-extensions.spec b/ovirt-engine-ui-extensions.spec index b69fb8c..bee1ad6 100644 --- a/ovirt-engine-ui-extensions.spec +++ b/ovirt-engine-ui-extensions.spec @@ -1,10 +1,11 @@ Name: ovirt-engine-ui-extensions Summary: oVirt UI Extensions Version: 1.2.6 -Release: 2 -License: ASL 2.0 +Release: 3 +License: Apache-2.0 URL: http://www.ovirt.org/ Source: ovirt-engine-ui-extensions-1.2.6.tar.gz +Patch0: 0001-Update-leading-zero-use-case-for-date-formatting.patch BuildArch: noarch @@ -31,6 +32,7 @@ Extensions include: # Unpack the source: %setup -q -n %{name}-%{version} +%patch 0 -p1 # Set up Node.js environment with dependencies linked to ./node_modules: source %{_datadir}/ovirt-engine-nodejs-modules/setup-env.sh @@ -74,10 +76,13 @@ ln -s "%{_datadir}/%{name}/ansible-playbooks/ovirt-cluster-upgrade.yml" "%{build %license LICENSE %changelog -* Fri Mar 3 2023 yanjianqing -1.2.6-2 +* Mon Nov 18 2024 jiangxinyu - 1.2.6-3 +- Fix leading zero issue with date formatting + +* Fri Mar 3 2023 yanjianqing - 1.2.6-2 - Change hardcoded deafult hash algorithm from legacy md4 to sha512 -* Tue Jul 6 2021 kymayl - 1.2.6-1 +* Tue Jul 6 2021 kymayl - 1.2.6-1 - upgrade package * Thu Mar 05 2020 huihui.fu - 1.0.10-1 -- Gitee