Skip to content

Commit d12ac21

Browse files
Fixing code style and creating new cases tests.
1 parent bb16e33 commit d12ac21

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

lib/internal/Magento/Framework/Stdlib/DateTime/Timezone.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,8 @@ public function convertConfigTimeToUtc($date, $format = 'Y-m-d H:i:s')
347347
}
348348

349349
/**
350+
* Append time to DateTime
351+
*
350352
* @param string $date
351353
* @param boolean $includeTime
352354
* @param string $timezone

lib/internal/Magento/Framework/Stdlib/Test/Unit/DateTime/TimezoneTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,18 @@ public function dateIncludeTimeDataProvider(): array
128128
true, // include time
129129
1495170060 // expected timestamp
130130
],
131+
'Parse greek d/m/y date without time' => [
132+
'30/10/2021', // datetime
133+
'el_GR', // locale
134+
false, // include time
135+
1635552000 // expected timestamp
136+
],
137+
'Parse greek d/m/y date with time' => [
138+
'30/10/21, 12:00 π.μ.', // datetime
139+
'el_GR', // locale
140+
true, // include time
141+
1635552000 // expected timestamp
142+
],
131143
];
132144
}
133145

0 commit comments

Comments
 (0)