Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 65624 invoked from network); 2 Feb 2006 11:56:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Feb 2006 11:56:28 -0000 Received: (qmail 98393 invoked by uid 500); 2 Feb 2006 11:56:25 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 98366 invoked by uid 500); 2 Feb 2006 11:56:25 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 98348 invoked by uid 99); 2 Feb 2006 11:56:24 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2006 03:56:24 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 74232C9 for ; Thu, 2 Feb 2006 12:56:03 +0100 (CET) Message-ID: <1108140096.1138881363452.JavaMail.jira@ajax.apache.org> Date: Thu, 2 Feb 2006 12:56:03 +0100 (CET) From: "John Haxby (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Created: (LUCENE-491) DateTools needs to use UTC for correct collation, MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N DateTools needs to use UTC for correct collation, ------------------------------------------------- Key: LUCENE-491 URL: http://issues.apache.org/jira/browse/LUCENE-491 Project: Lucene - Java Type: Bug Versions: CVS Nightly - Specify date in submission Environment: svn trunk at 02-Feb-2005, noon GMT. OS independent. Reporter: John Haxby If your local timezone is Europe/London then the times Sun, 30 Oct 2005 00:00:00 +0000 and exactly one hour later are both converted to 200530010000 by DateTools.dateToString() with minute resolution. The Linux date command is useful in seeing why: $ date --date "Sun, 30 Oct 2005 00:00:00 +0000" Sun Oct 30 01:00:00 BST 2005 $ date --date "Sun, 30 Oct 2005 01:00:00 +0000" Sun Oct 30 01:00:00 GMT 2005 Both times are 1am in the morning, but one is when DST is in force, the other isn't. Of course, these are actually different times! Of course, if dates are stored in the index with implicit timezone information then not only do we get problems when the clocks go back at the end of summer, but we also have problems crossing timezones. If a database is created in California and used in Paris then the times are going to be badly skewed (there's a nine hour time difference most of the year). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org