pnpm dedupe upated Typescript.
The update of Typescript is more complex. We also need to update the eslint
because there is a warning that TS version is not supported and
eslint-config-airbnb-typescript was abandoned so we need to remove it and
do some changes in eslint config for TS
[MAILPOET-6191]
The package is a subdependency of @wordpress/scripts
I tried pnpm update axios but it didn't work.
I removed @wordpress/scripts and installed the same version again
and it updated the axios.
[MAILPOET-6191]
I update pnpm because the required version is quite old and
some devs are using newer version anyways and mixing versions
causes strange changelogs in package-lock.yml
I ran corepack up but I removed the sha from the version
because the previous version didn't have it as well.
[MAILPOET-6191]
There is no use case for the methods without the translation to site's timezone.
When the input doesn't specify the timezone we treat it as utc.
When the input provides timezone (e.g. '2024-08-13 10:00+02:00' or new Date('2024-08-13 10:00+02:00'))
We respect the timezone of the input and print the result in the site's timezone.
When the site's timezone is set +01:00
'2024-08-13 10:00' prints as 2024-08-13 11:00
'2024-08-13 10:00:+02:00' prints as 2024-08-13 09:00
new Date('2024-08-13 10:00:+02:00') prints as 2024-08-13 09:00
new Date('2024-08-13 10:00:+00:00') prints as 2024-08-13 11:00
[MAILPOET-6142]
I looked into using DBAL events for this but found that DBAL events
are deprecated so I went with middleware as they are recommended
as a replacement for the DBAL events.
[MAILPOET-6142]
This is no longer used. It was used in just a couple of places
and was fixing a difference between PHP time zone and browser time.
We rely on WordPress to set PHP timezone to UTC and we use the site's
timezone on the client so the fix is no longer useful.
[MAILPOET-6142]
The user picks time in a select box, and we expect they pick a time
in the site's timezone so the saved cron expression is in the site's timezone.
When we calculate the next run date, we do it in the site's timezone and
to get UTC time, we convert it.
[MAILPOET-6142]
The time adjustments are not necessary because we rely on WP setting
timezone to UTC.
Manipulation in adjustTimezone difference was causing us to display GMT time.
[MAILPOET-6142]
$this->wp->currentTime('timestamp') adds 'gmt_offset' value.
This was needed with PDO connection because the connection
used @session.time_zone set to the same offset value.
[MAILPOET-6142]
Theoretically, we may end up running the delete query with a condition like
WHERE wp_user_id IN (null, null);
This is a tiny optimization to skip null IDs to avoid running such a query.
[MAILPOET-6142]
The test was using an empty entity which was not presisted. This may
potentially cause issues as in some places, an entity with a proper type might be expected.
It was already causing that an SQL query ran with WHERE type = null condition which is always false.
[MAILPOET-6142]