Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 32779 invoked from network); 24 Oct 2009 09:12:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Oct 2009 09:12:49 -0000 Received: (qmail 6524 invoked by uid 500); 24 Oct 2009 09:12:48 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 6443 invoked by uid 500); 24 Oct 2009 09:12:48 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 6433 invoked by uid 99); 24 Oct 2009 09:12:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Oct 2009 09:12:48 +0000 X-ASF-Spam-Status: No, hits=-3.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of pruefsum@me.com designates 17.148.16.101 as permitted sender) Received: from [17.148.16.101] (HELO asmtpout026.mac.com) (17.148.16.101) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Oct 2009 09:12:46 +0000 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii; format=flowed; delsp=yes Received: from [192.168.0.2] ([213.54.179.20]) by asmtp026.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KS000K9EHKMY670@asmtp026.mac.com> for derby-user@db.apache.org; Sat, 24 Oct 2009 02:12:25 -0700 (PDT) From: Fabio Subject: time format (or: the curse of dst) Date: Sat, 24 Oct 2009 11:12:48 +0200 Message-id: To: derby-user@db.apache.org X-Mailer: Apple Mail (2.1076) Hello, I'm using Apache Derby to store hourly values of electricity consumption. The values are used in an electricity market simulation implemented in Java. Now because of DST, hourly values mean that (for central Europe): - one day in March has 23 hours (there's no 2 a.m. to 3 a.m. during that night) - one day in October has 25 hours (2 a.m. to 3 a.m. appears twice during that night) The data in October is published as: (..) 02:00 3A:00 3B:00 04:00 05:00 (..) I have yet to find a good solution on how to store this data in the database. Obviously, "3A:00" is not a valid time format. Currently, I'm storing the consumption data in conjunction with a field named "hour_in_year" (1-8760) but having the date and time is more handy for sql select queries. Any ideas how to support the "curse of dst" in a time field? Fabio