-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Issue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report
Description
Preconditions
- Magento CE 2.1.8 bog standard, updated with composer update
- Locale set to English (United Kingdom)
- Timezone set to Europe/London
Steps to reproduce
- Run the following code
$date1 = $this->datetime->date();
$output->writeln(print_r($date1,true));
$date2 = $this->timezone->date($date1);
$output->writeln(print_r($date2,true));
Expected result
- $date1 should be UTC time
- $date2 should be an array with time set to local time, in this example UTC+1
Actual result
Set locale to English (United Kingdom)
2017-08-25 15:48:00
DateTime Object
(
[date] => 2031-02-07 15:48:00.000000
[timezone_type] => 3
[timezone] => Europe/London
)
Set locale to English (United States)
2017-08-25 15:46:40
DateTime Object
(
[date] => 2017-08-25 16:46:40.000000
[timezone_type] => 3
[timezone] => Europe/London
)
Metadata
Metadata
Assignees
Labels
Issue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report