Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

test 9438 #228

Draft
wants to merge 35 commits into
base: reference
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
79a61d5
Merge changes from develop.
sdpdeploy Dec 27, 2022
1e2be07
Merge changes from develop.
sdpdeploy Dec 28, 2022
c362906
Merge changes from develop.
sdpdeploy Jan 11, 2023
7e9c708
Merge changes from develop.
sdpdeploy Jan 12, 2023
7d09ffe
Merge changes from develop.
sdpdeploy Jan 12, 2023
68b6a60
Merge changes from develop.
sdpdeploy Feb 28, 2023
54ff34c
Merge changes from develop.
sdpdeploy Feb 28, 2023
eddc23b
Merge changes from develop.
sdpdeploy Mar 8, 2023
657b6dd
Merge changes from develop.
sdpdeploy Mar 14, 2023
81c6587
Merge changes from develop.
sdpdeploy Apr 17, 2023
a3bed01
Merge changes from develop.
sdpdeploy Apr 18, 2023
827bf70
Merge changes from develop.
sdpdeploy May 2, 2023
8505b7b
Merge changes from develop.
sdpdeploy May 2, 2023
b81e604
Merge changes from develop.
sdpdeploy May 31, 2023
e2d6b33
Merge changes from develop.
sdpdeploy May 31, 2023
38068c9
Merge changes from develop.
sdpdeploy May 31, 2023
e600720
Merge changes from develop.
sdpdeploy May 31, 2023
15653bf
Merge changes from develop.
sdpdeploy Jun 28, 2023
a0db98b
Merge changes from develop.
sdpdeploy Aug 2, 2023
b975e5e
Merge changes from develop.
sdpdeploy Aug 21, 2023
b527d93
Merge changes from develop.
sdpdeploy Sep 4, 2023
7b8cf7c
Merge changes from develop.
sdpdeploy Sep 6, 2023
dcf9e66
Merge changes from develop.
sdpdeploy Sep 18, 2023
1d4d484
Merge changes from develop.
sdpdeploy Sep 20, 2023
ac5b569
Merge changes from develop.
sdpdeploy Nov 16, 2023
8d2c3bc
Merge changes from develop.
sdpdeploy Dec 1, 2023
3d5b15d
Merge changes from develop.
sdpdeploy Dec 1, 2023
65c6df5
Merge changes from develop.
sdpdeploy Dec 21, 2023
a7d76c0
Merge changes from develop.
sdpdeploy Jan 25, 2024
ee08b47
Merge changes from develop.
sdpdeploy Mar 12, 2024
b162852
Merge changes from develop.
sdpdeploy Apr 8, 2024
af50a4c
Merge changes from develop.
sdpdeploy Apr 22, 2024
ab1ccc0
Merge changes from develop.
sdpdeploy May 2, 2024
9107c99
Merge changes from develop.
sdpdeploy May 2, 2024
6740fc9
test 9438
vincent-gao Jul 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"name": "dpc-sdp/tide_landing_page",
"description": "Landing Page content type and related configuration for Tide Drupal 10 distribution",
"type": "drupal-module",
"license": "GPL-2.0-or-later",
"require": {
"dpc-sdp/tide_core": "^4.0.0",
"dpc-sdp/tide_media": "^4.0.0",
"dpc-sdp/tide_event": "^4.0.0",
"dpc-sdp/tide_api": "^4.0.0"
},
"suggest": {
"dpc-sdp/tide_api:^4.0.0": "Allows to use Drupal in headless mode",
"dpc-sdp/tide_webform:^4.0.0": "Allows to use questionnaires",
"dpc-sdp/tide_news:^4.0.0": "News content type and related configuration for Tide Drupal 10 distribution"
},
"repositories": {
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/10"
}
"description": "Landing Page content type and related configuration for Tide Drupal 10 distribution",
"license": "GPL-2.0-or-later",
"name": "dpc-sdp/tide_landing_page",
"repositories": {
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/10"
}
},
"require": {
"dpc-sdp/tide_api": "dev-reference",
"dpc-sdp/tide_core": "dev-reference",
"dpc-sdp/tide_event": "dev-reference",
"dpc-sdp/tide_media": "dev-reference"
},
"suggest": {
"dpc-sdp/tide_api:^4.0.0": "Allows to use Drupal in headless mode",
"dpc-sdp/tide_news:^4.0.0": "News content type and related configuration for Tide Drupal 10 distribution",
"dpc-sdp/tide_webform:^4.0.0": "Allows to use questionnaires"
},
"type": "drupal-module"
}
18 changes: 10 additions & 8 deletions src/Helper/TideLandingPageHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ class TideLandingPageHelper {
* The converted date.
*/
public static function localDateAndTimeFormatter($date) {
// Parse date with GMT timezone.
$storage_tz = DateTimeItemInterface::STORAGE_TIMEZONE;
$drupal_date_time = new DrupalDateTime($date, $storage_tz);
// Convert to local timezone.
$system_tz = \Drupal::service('config.factory')->get('system.date')->get('timezone.default');
$date_formatter = \Drupal::service('date.formatter');
$converted_date = $date_formatter->format($drupal_date_time->getTimeStamp(), 'custom', 'Y-m-d H:i:s', $system_tz);
return $converted_date;
if (!empty($date)) {
// Parse date with GMT timezone.
$storage_tz = DateTimeItemInterface::STORAGE_TIMEZONE;
$drupal_date_time = new DrupalDateTime($date, $storage_tz);
// Convert to local timezone.
$system_tz = \Drupal::service('config.factory')->get('system.date')->get('timezone.default');
$date_formatter = \Drupal::service('date.formatter');
$converted_date = $date_formatter->format($drupal_date_time->getTimeStamp(), 'custom', 'Y-m-d H:i:s', $system_tz);
return $converted_date;
}
}

}
Loading