[
http://opensource.atlassian.com/projects/roller/browse/ROL-1515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_14005
]
Miles Huang commented on ROL-1515:
----------------------------------
Test case:
Start the roller in a jvm, with default time zone set to Etc/GMT+7. (jvm's
default time zone can be changed by system property. For example, add
-Duser.timezone=Etc/GMT+7 to the java command line parameter. )
Create a new blog, set its time zone to Etc/GMT+8.
Add 4 entries into the blog:
1. Title: Entry at end of June, Pubtime: 2007/06/30 23:59:59
2. Title: Entry at start of July, Pubtime: 2007/07/01 00:00:00
3. Title: Entry at end of July, Pubtime: 2007/07/31 23:59:59
4. Title: Entry at start of Auguest, Pubtime: 2007/08/01 00:00:00
The pubtime is local time measured by weblog's time zone, as prompted in the UI.
The entries list is a little confused as it display published and updated time
by jvm's default time zone. But this doesn't affect further steps we will do.
Check the weblog's rendering results, by weblog entries URL
date/200706,date/200707,date/200708
Notice the following problems:
1. In page /date/200706, Entry list okay. The calendar showing is May 2007, and
next month link is 200707
2. In page /date/200707, Entry list okay. The calendar showing is June 2007,
and next month link is 200708, prev month link is 200707
3. In page /date/200708, Entry list okay. The calendar showing is July 2007,
the entry at July 1st is missing in the calendar
4. Entry listing page for 8char format date is actually 1 day shift to the
requested date. For example, page /date/20070801, Entry list and calendar
showing is actually for date 20070731.
5. In entry listing page for 8char format date, Calendar day link is not
reflecting entry existence correctly. For example, in /date/20070731, we can
see the calendar for July 2007, which only July 1st has entry. In page
/date/20070801/, still show the July 2007 calendar. But this time only July
last has entry.
Apply the patch, you can find out the correct results.
And the original patch is updated to resolve another 2 problem:
1. WeblogCalendarModel.patch: Add patch for a little bug about the previous and
next month link search algorithm. It should not include the start/end of the
month date in the search condition range.
2. AbstractWeblogEntriesPager.patch: For the problems 4 and 5 mentioned before.
> WeblogCalendarModel should use timezone setting of weblog consistently
> ----------------------------------------------------------------------
>
> Key: ROL-1515
> URL:
> http://opensource.atlassian.com/projects/roller/browse/ROL-1515
> Project: Roller
> Issue Type: Bug
> Components: Page Rendering & Management
> Affects Versions: 4.0
> Environment: An site with weblogs' timezone differ from system
> default timezone.
> Reporter: Miles Huang
> Assignee: David Johnson
> Fix For: 4.1
>
> Attachments: WeblogCalendarModel.patch
>
>
> The calendar model converts time between String and Date format with
> inconsistent time zone. Although a calendar member has been set with weblog's
> time zone configuration, system default time zone is still be used somewhere
> implicitly.
> A patch file has been attached here. But it is more like an issue indicator
> than a final solution. Specifically, the two methods added would be better
> applied in DateUtil (which is not part of the weblogger app now), in a
> different manner.
> The DateUtil may add a series of methods as getXXXDateFormat(Calendar cal),
> with Calendar as input parameter, generate time zone and locale aware
> DateFormat instances. Then all references to the getXXXDateFormat() methods
> shall be revised.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/roller/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira