[GitHub] ant pull request #40: Add tests for parseLenientDateTime

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] ant pull request #40: Add tests for parseLenientDateTime

bodewig
GitHub user GKFX opened a pull request:

    https://github.com/apache/ant/pull/40

    Add tests for parseLenientDateTime

    As requested for #36.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/GKFX/ant feature-testlenientdate

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ant/pull/40.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #40
   
----
commit 6f58ed8a65ac112514c8f9c5ba19309916bad1d5
Author: George Bateman <[hidden email]>
Date:   2017-09-29T14:57:25Z

    Add tests for parseLenientDateTime

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] ant issue #40: Add tests for parseLenientDateTime

bodewig
Github user bodewig commented on the issue:

    https://github.com/apache/ant/pull/40
 
    Many thanks.
   
    I've fixed the line-ends to contain line-feeds only as I couldn't merge your patch on a Linux box, therefore the PR now has conflicts. Sorry about that.
   
    As written the tests depend on the timezone of the machine  running the tests:
   
    ```
    Testcase: testLenientDateTime took 0,006 sec
    FAILED
    expected:<1488622440000> but was:<1488618840000>
    junit.framework.AssertionFailedError: expected:<1488622440000> but was:<1488618840000>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)
    at org.junit.Assert.assertEquals(Assert.java:118)
    at org.junit.Assert.assertEquals(Assert.java:555)
    at org.junit.Assert.assertEquals(Assert.java:542)
    at org.apache.tools.ant.util.DateUtilsTest.testLenientDateTime(DateUtilsTest.java:119)
    ```
   
    this is on GMT+2 and off by an hour.  But as this is off by an hour I think it is more about me being in daylight saving time right now while the date you picked was not (the EU switches on the last weekends of March and October).


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] ant issue #40: Add tests for parseLenientDateTime

bodewig
In reply to this post by bodewig
Github user GKFX commented on the issue:

    https://github.com/apache/ant/pull/40
 
    That's interesting; since the values I were testing were coming out GMT, and I'm in British Summer Time at the moment, I thought the timezone was being set to UTC and so it would work everywhere. Apparently not, so I'll make a note in the documentation.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] ant issue #40: Add tests for parseLenientDateTime

bodewig
In reply to this post by bodewig
Github user bodewig commented on the issue:

    https://github.com/apache/ant/pull/40
 
    I haven't found the time to dig deeply into the issue, but it would be good to understand where exactly things turn into unexpected directions.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] ant issue #40: Add tests for parseLenientDateTime

bodewig
In reply to this post by bodewig
Github user GKFX commented on the issue:

    https://github.com/apache/ant/pull/40
 
    Changing the date to within BST does mean that, for me, it gets interpreted
    as being a BST date. So, given what you see as well, I think that format
    parses date/times as if they were what you had seen on a local clock. I
    don't see anything in SimpleDateFormat's Javadoc that confirms that though.
   
    On 2 October 2017 at 09:46, Stefan Bodewig <[hidden email]> wrote:
   
    > I haven't found the time to dig deeply into the issue, but it would be
    > good to understand where exactly things turn into unexpected directions.
    >
    > —
    > You are receiving this because you authored the thread.
    > Reply to this email directly, view it on GitHub
    > <https://github.com/apache/ant/pull/40#issuecomment-333475300>, or mute
    > the thread
    > <https://github.com/notifications/unsubscribe-auth/AFHASjBNDG_dInS6rwUFws3xXBTksCElks5soKL-gaJpZM4Poy-o>
    > .
    >



---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]