Closed (fixed)
Project:
Date
Version:
7.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Jan 2016 at 11:23 UTC
Updated:
11 Apr 2017 at 14:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
podarokComment #3
anpolimusWill take a look today.
Comment #4
anpolimusComment #5
anpolimusbot up
Comment #6
anpolimusComment #7
anpolimusbot up
Comment #10
anpolimusThe similar issue: #2457423: Incorrectly-initialized DateTime object(s) cause PHP warnings in DateTime::format(), other DateObject functions
Comment #11
anpolimusComment #12
anpolimusbot up
Comment #15
anpolimusComment #16
anpolimusComment #18
podarokbot up
Comment #19
anpolimusAs we can see, tests for date module are written for PHP 5.3 and are failing at greater versions.
Now, we have to rebuild failed test for getting them working properly at PHP >=5.4
Comment #20
anpolimusComment #22
Stevel commentedThe tests are currently broken mostly because of the new 'administer fields' permission introduced with Drupal 7.50. This patch tries to fix at least that.
Comment #23
Stevel commentedComment #24
Stevel commentedTestbot returns green, but locally I still have errors because of the timezone tests (tz_handling utc), maybe because the server timezone is not UTC? Adding Europe/Dublin as per #15
Comment #25
Stevel commentedFurther testing shows that the tests do work locally if the site running the testbot has the default timezone set to UTC, but not when it's set to something else. I'll file a new bug for this,
so let's stick with #22 on this one.Edit: #24 still increases test coverage, so it's still better than #22.
Comment #26
Stevel commentedComment #27
damienmckennaLatest core codebase, latest Date git codebase, PHP 5.6.10.
Relevant PHP settings:
Before the patch:
After the patch:
Comment #28
damienmckennaTesting again after changing the timezone to UTC.
Date-related settings:
Test results:
So what's the problem with timezones? Is it #998076: Problem with timezone handling (caused by date_get_timezone_db returning only UTC) or #2775223: Timezone tests fail if site timezone is not UTC or something else? With so many problems in the codebase, and open issues with patches, it's hard to tell.
Comment #29
damienmckennaMerging the changes from #2775223: Timezone tests fail if site timezone is not UTC.
Comment #30
damienmckennaTesting the new patch.
Date-related settings:
Test results:
Thanks @Stevel for your work, it seems to fix the problems!
Comment #31
damienmckennaI'm going to RTBC this based on the premise it's all work by other people, I just pulled in an extra change from @Stevel with the last patch, but it was again Stevel's work not mine.
Great work everyone! Hopefully a maintainer will be able to commit this and we'll be able to get back to making other patches pass their tests too.
Comment #32
damienmckennaComment #34
vijaycs85Thanks everyone!