Return-Path: Delivered-To: apmail-roller-commits-archive@www.apache.org Received: (qmail 5882 invoked from network); 9 Aug 2007 23:08:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Aug 2007 23:08:20 -0000 Received: (qmail 773 invoked by uid 500); 9 Aug 2007 23:08:19 -0000 Delivered-To: apmail-roller-commits-archive@roller.apache.org Received: (qmail 735 invoked by uid 500); 9 Aug 2007 23:08:19 -0000 Mailing-List: contact commits-help@roller.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@roller.apache.org Delivered-To: mailing list commits@roller.apache.org Received: (qmail 726 invoked by uid 500); 9 Aug 2007 23:08:19 -0000 Delivered-To: apmail-incubator-roller-commits@incubator.apache.org Received: (qmail 723 invoked by uid 99); 9 Aug 2007 23:08:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Aug 2007 16:08:19 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [63.246.22.44] (HELO atlassian01.managed.contegix.com) (63.246.22.44) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Aug 2007 23:08:14 +0000 Received: from atlassian01.managed.contegix.com (atlassian01.managed.contegix.com [127.0.0.1]) by atlassian01.managed.contegix.com (Postfix) with ESMTP id 3276C2F019B for ; Thu, 9 Aug 2007 18:07:54 -0500 (CDT) Message-ID: <157688992.1186700874204.JavaMail.j2ee@atlassian01.managed.contegix.com> Date: Thu, 9 Aug 2007 18:07:54 -0500 (CDT) From: "Miles Huang (JIRA)" To: roller-commits@incubator.apache.org Subject: [Roller-JIRA] Commented: (ROL-1515) WeblogCalendarModel should use timezone setting of weblog consistently In-Reply-To: <143592435.1185999205020.JavaMail.j2ee@atlassian01.managed.contegix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ 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