From 492bc83b261265404c9db93f496824e077fbe254 Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Sun, 7 Apr 2024 23:17:35 +0900 Subject: [PATCH 1/4] Adjust time zone to PHP --- e2e-tests/test/admin/total/total.test.ts | 4 ++- package.json | 1 + yarn.lock | 45 +++++++++++++++++++++--- 3 files changed, 44 insertions(+), 6 deletions(-) diff --git a/e2e-tests/test/admin/total/total.test.ts b/e2e-tests/test/admin/total/total.test.ts index 50565cba3c..5f06a62072 100644 --- a/e2e-tests/test/admin/total/total.test.ts +++ b/e2e-tests/test/admin/total/total.test.ts @@ -1,5 +1,7 @@ import { test, expect, chromium, Page } from '@playwright/test'; import { ZapClient, Mode, ContextType } from '../../../utils/ZapClient'; +import { toZonedTime } from 'date-fns-tz'; + import fs from 'fs/promises'; import { ADMIN_DIR } from '../../../config/default.config'; @@ -25,7 +27,7 @@ test.describe.serial('売上集計画面を確認をします', () => { await page.goto(url); }); - const current = new Date(); + const current = toZonedTime(new Date(), 'Asia/Tokyo'); test.describe('期間別集計の確認をします', () => { const method = 'term'; test('期間別集計画面を開きます', async () => { diff --git a/package.json b/package.json index ab98d20d60..232e9db0ab 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "@babel/polyfill": "^7.12.1", "css-loader": "^6.10.0", "date-fns": "^3.6.0", + "date-fns-tz": "^3.0.0", "jquery": "3", "jquery-colorbox": "^1.6.4", "jquery-easing": "^0.0.1", diff --git a/yarn.lock b/yarn.lock index 3cdb7e8271..d6ee4f0612 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1442,16 +1442,23 @@ acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn@^8.7.1, acorn@^8.8.2, acorn@^8.9.0: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== + ajv-formats@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== dependencies: ajv "^8.0.0" -acorn@^8.7.1, acorn@^8.8.2, acorn@^8.9.0: - version "8.11.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" - integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== + +ajv-keywords@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" + integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== ajv-keywords@^5.1.0: version "5.1.0" @@ -1904,6 +1911,13 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +date-fns-tz@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/date-fns-tz/-/date-fns-tz-3.0.0.tgz#0559cd6a1aa8eca1d140f1682ad7f0e77429c13e" + integrity sha512-YgRowJwvCAAjN1A5F2l1ZjnYKThX7YDq399qo+ThXFpeOqinN1u8SUqfM5IdRQSpai18Iy3EBMb6/CXTSnDstg== + dependencies: + lodash.clonedeep "^4.5.0" + date-fns@*, date-fns@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-3.6.0.tgz#f20ca4fe94f8b754951b24240676e8618c0206bf" @@ -3076,6 +3090,11 @@ locate-path@^7.1.0: dependencies: p-locate "^6.0.0" +lodash.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + integrity sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ== + lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" @@ -3391,6 +3410,13 @@ picomatch@^2.2.3: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + pkg-dir@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-7.0.0.tgz#8f0c08d6df4476756c5ff29b3282d0bab7517d11" @@ -3706,6 +3732,15 @@ safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== +schema-utils@^3.0.0, schema-utils@^3.1.1, schema-utils@^3.2.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" + integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== + dependencies: + "@types/json-schema" "^7.0.8" + ajv "^6.12.5" + ajv-keywords "^3.5.2" + schema-utils@^4.0.0: version "4.2.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.2.0.tgz#70d7c93e153a273a805801882ebd3bff20d89c8b" @@ -3716,7 +3751,7 @@ schema-utils@^4.0.0: ajv-formats "^2.1.1" ajv-keywords "^5.1.0" -semver@^6.0.0, semver@^6.3.1: +semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== From 2637cd4be55c64abc46d54deb06c444895ad8714 Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Mon, 8 Apr 2024 23:23:21 +0900 Subject: [PATCH 2/4] =?UTF-8?q?=E3=82=A8=E3=83=93=E3=83=87=E3=83=B3?= =?UTF-8?q?=E3=82=B9=E3=81=AE=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=83=95?= =?UTF-8?q?=E3=82=A9=E3=83=BC=E3=83=9E=E3=83=83=E3=83=88=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/e2e-tests.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index f9617ffb2f..62a2022b1a 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -56,6 +56,8 @@ jobs: OWNER: ${{ inputs.owner }} DB: ${{ matrix.db }} PHP: ${{ matrix.php }} + PATTERN: ${{ matrix.pattern }} + GROUP: ${{ matrix.group }} run: | echo "COMPOSE_FILE=docker-compose.yml:docker-compose.${DB}.yml:docker-compose.dev.yml:docker-compose.owaspzap.yml:docker-compose.owaspzap.daemon.yml" >> $GITHUB_ENV echo "IMAGE_NAME=${OWNER,,}/ec-cube2-php" >> $GITHUB_ENV @@ -64,6 +66,8 @@ jobs: else echo "TAG=${PHP}-apache-${REF_NAME}" >> $GITHUB_ENV fi + echo "PATTERN=${PATTERN//:/-}" >> $GITHUB_ENV + echo "GROUP=${GROUP//\//-}" >> $GITHUB_ENV - if: matrix.pattern == 'test:e2e-extends' run: cp -rp tests/class/fixtures/page_extends/* data/class_extends/page_extends @@ -105,13 +109,13 @@ jobs: if: failure() uses: actions/upload-artifact@v4 with: - name: linux-php${{ matrix.tag }}-${{ matrix.db }}-evidence + name: linux-php${{ matrix.php }}-${{ matrix.db }}-${{ env.PATTERN }}-${{ env.GROUP }}-evidence path: 'test-results/' - name: Upload logs if: failure() uses: actions/upload-artifact@v4 with: - name: linux-php${{ matrix.php }}-${{ matrix.db }}-logs + name: linux-php${{ matrix.php }}-${{ matrix.db }}-${{ env.PATTERN }}-${{ env.GROUP }}-logs path: data/logs installer: name: Installer test From a7a2b1a43b6437008436bdb52168aaa1f8270f00 Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Wed, 10 Apr 2024 00:53:35 +0900 Subject: [PATCH 3/4] =?UTF-8?q?DB=E3=81=AE=E3=82=BF=E3=82=A4=E3=83=A0?= =?UTF-8?q?=E3=82=BE=E3=83=BC=E3=83=B3=E3=82=92=20Asia/Tokyo=20=E3=81=AB?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.mysql.yml | 3 ++- docker-compose.pgsql.yml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docker-compose.mysql.yml b/docker-compose.mysql.yml index 9ba2db1abd..ea0ea5c86b 100644 --- a/docker-compose.mysql.yml +++ b/docker-compose.mysql.yml @@ -36,12 +36,13 @@ services: mysql: image: mysql:5.7 - command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci + command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci --default-time-zone=+09:00 ports: - '13306:3306' volumes: - mysql-database:/var/lib/mysql environment: + TZ: Asia/Tokyo MYSQL_ROOT_PASSWORD: password MYSQL_DATABASE: eccube_db MYSQL_USER: eccube_db_user diff --git a/docker-compose.pgsql.yml b/docker-compose.pgsql.yml index 96cacf6e60..1d3c1e406d 100644 --- a/docker-compose.pgsql.yml +++ b/docker-compose.pgsql.yml @@ -37,6 +37,7 @@ services: postgres: image: postgres environment: + - TZ=Asia/Tokyo - POSTGRES_DB=eccube_db - POSTGRES_USER=eccube_db_user - POSTGRES_PASSWORD=password From 17c238293786e8d7110646a336910f9e05ce1c9a Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Tue, 16 Apr 2024 00:11:15 +0900 Subject: [PATCH 4/4] Fix baseimage see https://github.com/zaproxy/zaproxy/issues/8450#issuecomment-2057092058 --- zap/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zap/Dockerfile b/zap/Dockerfile index 10833bc889..9f5eff0056 100644 --- a/zap/Dockerfile +++ b/zap/Dockerfile @@ -1,4 +1,4 @@ -FROM owasp/zap2docker-stable +FROM ghcr.io/zaproxy/zaproxy:stable USER root RUN apt-get update \