Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10512

Test failure when no default timezone is set in php

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.9
    • Fix Version/s: 3.0.11-RC1
    • Component/s: None
    • Labels:
      None

      Description

      1) phpbb_wrapper_gmgetdate_test::test_gmgetdate
      date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead
       
      /home/phpdev/test-phpbb/phpBB/includes/functions.php:286
      /home/phpdev/test-phpbb/tests/wrapper/gmgetdate_test.php:36
      /home/phpdev/test-phpbb/tests/wrapper/gmgetdate_test.php:16
      /home/pie/apps/git-phpunit-bundle/phpunit.php:44
      

      Since we support running phpbb without a default timezone being set, a more sensible behavior here would be to skip just that one assertion if there is no default timezone.

        Activity

        Hide
        bantu Andreas Fischer added a comment -

        phpBB/includes/startup.php takes care of setting a timezone if none is set. I think tests/bootstrap.php should include phpBB/includes/startup.php and the assertion with default timezone should be removed.

        Show
        bantu Andreas Fischer added a comment - phpBB/includes/startup.php takes care of setting a timezone if none is set. I think tests/bootstrap.php should include phpBB/includes/startup.php and the assertion with default timezone should be removed.
        Hide
        imkingdavid David King added a comment -

        Including phpBB/includes/startup.php did the trick. I'll submit a patch in a bit.

        Show
        imkingdavid David King added a comment - Including phpBB/includes/startup.php did the trick. I'll submit a patch in a bit.
        Hide
        Oleg Oleg [X] (Inactive) added a comment -

        Including the entire startup.php might be too much, no?

        Show
        Oleg Oleg [X] (Inactive) added a comment - Including the entire startup.php might be too much, no?
        Hide
        bantu Andreas Fischer added a comment -

        Still seems okay to me.

        Show
        bantu Andreas Fischer added a comment - Still seems okay to me.

          People

          • Assignee:
            bantu Andreas Fischer
            Reporter:
            Oleg Oleg [X] (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development