Skip to content

Using date_default_timezone_set() and similar isn't allowed. #187

@matt-bernhardt

Description

@matt-bernhardt

Recent runs of PHPCS on Travis (including on #170) have returned the following:

FILE: ...ordpress/src/wp-content/themes/MITlibraries-parent/lib/hours.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 27 | ERROR | Using date_default_timezone_set() and similar isn't
    |       | allowed, instead use WP internal timezone support.
    |       | (WordPress.VIP.TimezoneChange.timezone_change)
----------------------------------------------------------------------

Fixing this will involve setting the default timezone at the server level, so it may take a bit of coordination. There may also be a better way of declaring such a timezone as the default - will research.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions