You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Dale Christ <de...@yahoo.com> on 2004/03/17 01:40:16 UTC

bug in DateUtil.java

All--

I found a (minor) bug in src/java/org/apache/lenya/util/DateUtil.java,
line 243.  It reads:

String hour = oneToTwoDigits("" + cal.get(Calendar.HOUR));

It should read:

String hour = oneToTwoDigits("" + cal.get(Calendar.HOUR_OF_DAY));
                                          ^^^^^^^^^^^^^^^^^^^^

The Blogs that I've done in the afternoon don't show 24-hour time.

I can send the file, or you can fix it.  I've also looked making the
blog both feed and W3C compliant.  The blog is neither at the moment. 
Would you like some help getting that code compliant?  

Accoring to the atom spec, the date should also include a GMT offset.
It doesn't at the moment.  

I'd be more than happy to help out where I can, especially with the
blog, if you want the help.

--Dale


__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com

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


Re: bug in DateUtil.java

Posted by Michael Wechner <mi...@wyona.com>.
Dale Christ wrote:

>All--
>
>I found a (minor) bug in src/java/org/apache/lenya/util/DateUtil.java,
>line 243.  It reads:
>
>String hour = oneToTwoDigits("" + cal.get(Calendar.HOUR));
>
>It should read:
>
>String hour = oneToTwoDigits("" + cal.get(Calendar.HOUR_OF_DAY));
>                                          ^^^^^^^^^^^^^^^^^^^^
>
>The Blogs that I've done in the afternoon don't show 24-hour time.
>  
>

ok, fixed. Thanks very much for the fix.

>I can send the file, or you can fix it.  I've also looked making the
>blog both feed and W3C compliant.  The blog is neither at the moment. 
>Would you like some help getting that code compliant?  
>  
>

sure , that would be great

>Accoring to the atom spec, the date should also include a GMT offset.
>It doesn't at the moment.  
>
>I'd be more than happy to help out where I can, especially with the
>blog, if you want the help.
>  
>

just send in the patches ;-)



btw, I have removed the copyright statement and the CVS line from the 
sample,
because if one creates a new entry based on the sample, one doesn't want to
have this comment in there. In case this is against ASF policy, then we 
could  put in between a transformer which would remove these comments.

Michi

>--Dale
>
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Mail - More reliable, more storage, less spam
>http://mail.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: lenya-dev-help@cocoon.apache.org
>
>
>  
>


-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com              http://cocoon.apache.org/lenya/
michael.wechner@wyona.com                        michi@apache.org


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


Re: bug in DateUtil.java

Posted by Christian Egli <ch...@wyona.net>.
Hi Dale

Dale Christ <de...@yahoo.com> writes:

> I found a (minor) bug in src/java/org/apache/lenya/util/DateUtil.java,
> line 243.  It reads:

Thanks for your fix. However instead of fixing the DateUtil class I'd
rather get rid of it alltogether, in fact it is marked as
deprecated. The java.text.DateFormat should be used instead.

I would be very much obliged if you'd purge the occurences of DateUtil
from crufty XSPs and replace them with java.text.DateFormat incantations.

> I can send the file, or you can fix it.  I've also looked making the
> blog both feed and W3C compliant.  The blog is neither at the moment. 
> Would you like some help getting that code compliant? 

I would be very much obliged if you'd purge the occurences of DateUtil
from crufty XSPs and replace them with java.text.DateFormat incantations.

> Accoring to the atom spec, the date should also include a GMT offset.
> It doesn't at the moment.  

I think Michi is interested in the atom spec and I'm sure he'd be
happy to have your patches.

> I'd be more than happy to help out where I can, especially with the
> blog, if you want the help.

Sure, we'd love to see patches.

-- 
Christian Egli       christian.egli@wyona.net   +41 1 272 9161
                     Wyona AG, Hardstrasse 219, CH-8005 Zurich
Open Source CMS      http://www.wyona.org http://www.wyona.com 


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