You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by GKFX <gi...@git.apache.org> on 2017/09/29 14:59:31 UTC

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

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 <ge...@gmail.com>
Date:   2017-09-29T14:57:25Z

    Add tests for parseLenientDateTime

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


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

Posted by bodewig <gi...@git.apache.org>.
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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


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

Posted by bodewig <gi...@git.apache.org>.
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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


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

Posted by GKFX <gi...@git.apache.org>.
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 <no...@github.com> 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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


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

Posted by GKFX <gi...@git.apache.org>.
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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org