You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Grant Ingersoll (JIRA)" <ji...@apache.org> on 2007/09/23 04:04:50 UTC

[jira] Created: (LUCENE-1005) GData TestDateFormater (sic) fails when the Date returned is: Sun, 23 Sep 2007 01:29:06 GMT+00:00

GData TestDateFormater (sic) fails when the Date returned is: Sun, 23 Sep 2007 01:29:06 GMT+00:00
-------------------------------------------------------------------------------------------------

                 Key: LUCENE-1005
                 URL: https://issues.apache.org/jira/browse/LUCENE-1005
             Project: Lucene - Java
          Issue Type: Bug
          Components: Other
            Reporter: Grant Ingersoll


TestDateFormater.testFormatDate fails when the Date returned is Sun, 23 Sep 2007 01:29:06 GMT+00:00

The issue lies with the +00:00 at the end of the string.  

The question is, though, is that a valid date for GData?

This is marked as major b/c it is causing nightly builds to fail.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (LUCENE-1005) GData TestDateFormater (sic) fails when the Date returned is: Sun, 23 Sep 2007 01:29:06 GMT+00:00

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Ingersoll updated LUCENE-1005:
------------------------------------

    Attachment: LUCENE-1005.patch

  OK, here is a patch that sets the time zone, I will give it a try on zones.

> GData TestDateFormater (sic) fails when the Date returned is: Sun, 23 Sep 2007 01:29:06 GMT+00:00
> -------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-1005
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1005
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Other
>            Reporter: Grant Ingersoll
>         Attachments: LUCENE-1005.patch
>
>
> TestDateFormater.testFormatDate fails when the Date returned is Sun, 23 Sep 2007 01:29:06 GMT+00:00
> The issue lies with the +00:00 at the end of the string.  
> The question is, though, is that a valid date for GData?
> This is marked as major b/c it is causing nightly builds to fail.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (LUCENE-1005) GData TestDateFormater (sic) fails when the Date returned is: Sun, 23 Sep 2007 01:29:06 GMT+00:00

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530187 ] 

Hoss Man commented on LUCENE-1005:
----------------------------------

i won't dispute that the SImpleDateFormatter pattern is doing what it says it does ... my point is that according to the HTTP spec that's not the format that should be used ... the test is not buggy, the code is.

No matter what timezone or locale the test is executed in, formated dates (for the purpose of HTTP headers which is what this says it does) should always end in " GMT"

i believe the SimpelDateFormatter can be forced to do this if we use the setTimeZone method on the formatter (by default it uses the system's current timezone)

> GData TestDateFormater (sic) fails when the Date returned is: Sun, 23 Sep 2007 01:29:06 GMT+00:00
> -------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-1005
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1005
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Other
>            Reporter: Grant Ingersoll
>
> TestDateFormater.testFormatDate fails when the Date returned is Sun, 23 Sep 2007 01:29:06 GMT+00:00
> The issue lies with the +00:00 at the end of the string.  
> The question is, though, is that a valid date for GData?
> This is marked as major b/c it is causing nightly builds to fail.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (LUCENE-1005) GData TestDateFormater (sic) fails when the Date returned is: Sun, 23 Sep 2007 01:29:06 GMT+00:00

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530525 ] 

Grant Ingersoll commented on LUCENE-1005:
-----------------------------------------

I tried this out on zones and it passes and fails without it, so I am going to apply it.

> GData TestDateFormater (sic) fails when the Date returned is: Sun, 23 Sep 2007 01:29:06 GMT+00:00
> -------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-1005
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1005
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Other
>            Reporter: Grant Ingersoll
>         Attachments: LUCENE-1005.patch
>
>
> TestDateFormater.testFormatDate fails when the Date returned is Sun, 23 Sep 2007 01:29:06 GMT+00:00
> The issue lies with the +00:00 at the end of the string.  
> The question is, though, is that a valid date for GData?
> This is marked as major b/c it is causing nightly builds to fail.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (LUCENE-1005) GData TestDateFormater (sic) fails when the Date returned is: Sun, 23 Sep 2007 01:29:06 GMT+00:00

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12529728 ] 

Hoss Man commented on LUCENE-1005:
----------------------------------

a cursory glance at the code in o.a.l.gdata.utils.DateFormater indicates that two SimpleDateFormater format strings are used ... they are both documented as "Date format as it is used in Http Last modified header", the only difference being between little z and big Z for timezones.

while servers are generally suppose to be lenient in parsing, formating of dates is always suppose to end in " GMT", so it seems that a maybe a setTimeZone cll on the formater when constructed is in order?



> GData TestDateFormater (sic) fails when the Date returned is: Sun, 23 Sep 2007 01:29:06 GMT+00:00
> -------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-1005
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1005
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Other
>            Reporter: Grant Ingersoll
>
> TestDateFormater.testFormatDate fails when the Date returned is Sun, 23 Sep 2007 01:29:06 GMT+00:00
> The issue lies with the +00:00 at the end of the string.  
> The question is, though, is that a valid date for GData?
> This is marked as major b/c it is causing nightly builds to fail.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (LUCENE-1005) GData TestDateFormater (sic) fails when the Date returned is: Sun, 23 Sep 2007 01:29:06 GMT+00:00

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530180 ] 

Grant Ingersoll commented on LUCENE-1005:
-----------------------------------------

In reading http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html dates do not have to end in just GMT, they can be GMT +/- and offset of hours and minutes.

It seems like GMT+00:00 should be valid, as the lowercase 'z' symbol gives:

z  	Time zone 	General time zone  	Pacific Standard Time; PST; GMT-08:00

as an example.  If I put in the Date above (which caused a failure) as a test on my machine it passes.

I think the error is actually in the test in that the Pattern that is used to compare the output does not account for the GMT offset method for time zones.

Thoughts?  If not, I will put in a fix for the Regex to account for the GMT offset method.

> GData TestDateFormater (sic) fails when the Date returned is: Sun, 23 Sep 2007 01:29:06 GMT+00:00
> -------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-1005
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1005
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Other
>            Reporter: Grant Ingersoll
>
> TestDateFormater.testFormatDate fails when the Date returned is Sun, 23 Sep 2007 01:29:06 GMT+00:00
> The issue lies with the +00:00 at the end of the string.  
> The question is, though, is that a valid date for GData?
> This is marked as major b/c it is causing nightly builds to fail.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (LUCENE-1005) GData TestDateFormater (sic) fails when the Date returned is: Sun, 23 Sep 2007 01:29:06 GMT+00:00

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Ingersoll resolved LUCENE-1005.
-------------------------------------

    Resolution: Fixed

> GData TestDateFormater (sic) fails when the Date returned is: Sun, 23 Sep 2007 01:29:06 GMT+00:00
> -------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-1005
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1005
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Other
>            Reporter: Grant Ingersoll
>         Attachments: LUCENE-1005.patch
>
>
> TestDateFormater.testFormatDate fails when the Date returned is Sun, 23 Sep 2007 01:29:06 GMT+00:00
> The issue lies with the +00:00 at the end of the string.  
> The question is, though, is that a valid date for GData?
> This is marked as major b/c it is causing nightly builds to fail.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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