Skip to content

Magento\Framework\Stdlib\DateTime\TimezoneInterface broken for English(United Kingdom) locale #10663

@gwharton

Description

@gwharton

Preconditions

  1. Magento CE 2.1.8 bog standard, updated with composer update
  2. Locale set to English (United Kingdom)
  3. Timezone set to Europe/London

Steps to reproduce

  1. 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

  1. $date1 should be UTC time
  2. $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

No one assigned

    Labels

    Issue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions