Hi,

I am not sure if others had this bug before:

1. Java JVM use timezone A
2. User use timezone B where timezone A and B more than 12 hours. Because 
roller shift the hours to noon.

3. the date that has entry has url different from what is shown. For example, 
clicking November 16 will show entry November 15 because the url is 20091115

I made patch:

--- 
roller_trunk_org/apps/weblogger/src/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java   
 2009-11-08 00:18:10.582128527 +1100
+++ 
roller_trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java       
 2009-11-16 23:34:07.130778563 +1100
@@ -1099,6 +1099,7 @@
         }
         
         SimpleDateFormat formatter = DateUtil.get8charDateFormat();
+       formatter.setTimeZone(website.getTimeZoneInstance());
         for (Iterator wbItr = entries.iterator(); wbItr.hasNext();) {
             WeblogEntry entry = (WeblogEntry) wbItr.next();
             Date sDate = DateUtil.getNoonOfDay(entry.getPubTime(), cal);


Please verify if this is necessary. I checked the result is correct, i.e., 
clicking November 16 will show entry with url contains 20091116


If this is a bug, I did 

grep --regexp="\.format\b" * -R | sed '/build/d' | sed '/\.svn/d' | sed 
'/Binary/d' | sed '/docs/d' | sed '/^web\//d' | less

inside apps/weblogger and there are some SimpleDateFormat format being used 
without setting it with the correct timezone. But I have difficulties to decide 
which one needs to set its timezone with the website (user) timezone.

Anyone can help?

Regards,
Jery



      

Reply via email to