Closed andriy-samson closed 3 years ago
You modified too many codes, I cannot accept it, sry.
And I think there should have a better way to support DST offset, pls give me some time.
Thanks for your feedback. I didn't expect this pull request to be accepted it as it is. In this pull request I would like just to show the problem (in test cases) and possible solution just using external API. For sure there is a better fix. The real fix has to be done in DateBuilder.toDate() or deeper.
The idea is simple:
I will try to revert all and find a better solution for this problem.
Regards, Andriy.
To revial the problem of Daylight Saving Time(DST), you can uncomment the test case: DateParserTest.test_showsDstProblem() Also, I think that the problem is visible only when it runs on machine with time zone where DST is active during the test. For example on machine with regional settings of time zone where the it has DST activated (summer period)
To avoid backward compatibility problem I didn't change the internal implementation of DateBuilder.toDate() method wher the original time zone offset computation is done. Instead I try to add a new method with expected (fixed) fixed behaviour.
Let me know if you need more information, Regards, Andriy