Return-Path: X-Original-To: apmail-empire-db-user-archive@www.apache.org Delivered-To: apmail-empire-db-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8BD3AE62C for ; Wed, 6 Mar 2013 09:35:26 +0000 (UTC) Received: (qmail 53749 invoked by uid 500); 6 Mar 2013 09:35:26 -0000 Delivered-To: apmail-empire-db-user-archive@empire-db.apache.org Received: (qmail 53511 invoked by uid 500); 6 Mar 2013 09:35:20 -0000 Mailing-List: contact user-help@empire-db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@empire-db.apache.org Delivered-To: mailing list user@empire-db.apache.org Received: (qmail 53440 invoked by uid 99); 6 Mar 2013 09:35:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Mar 2013 09:35:18 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [194.94.44.224] (HELO ironport1.embl.de) (194.94.44.224) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Mar 2013 09:35:11 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqAEANwMN1EKCwVl/2dsb2JhbABEwhSCXYFxc4IqAQEFOBslEQsYCRYPCQMCAQIBRRMIAQHED48UFoMqA5ZKhhqNXQ X-IPAS-Result: AqAEANwMN1EKCwVl/2dsb2JhbABEwhSCXYFxc4IqAQEFOBslEQsYCRYPCQMCAQIBRRMIAQHED48UFoMqA5ZKhhqNXQ X-IronPort-AV: E=Sophos;i="4.84,793,1355094000"; d="scan'208";a="13056140" Received: from lxmail01-vm.embl.de (HELO mail.embl.de) ([10.11.5.101]) by ironport1.embl.de with ESMTP/TLS/DHE-RSA-AES256-SHA; 06 Mar 2013 10:34:51 +0100 Received: (qmail 5699 invoked by uid 107); 6 Mar 2013 09:34:51 -0000 Received: from unknown (HELO ?10.11.108.88?) (becam@10.11.108.88) by lxmail01-vm.embl.de with ESMTPA; 6 Mar 2013 09:34:51 -0000 Message-ID: <51370DBB.3000703@embl.de> Date: Wed, 06 Mar 2013 10:34:51 +0100 From: Alain Becam Organization: EMBL User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 MIME-Version: 1.0 To: user@empire-db.apache.org Subject: Re: Strange problem with Date while inserting References: <51348182.9030206@embl.de> <40EDCD6B-DC39-4F11-9CDB-E7A69FBDD947@j-b-s.de> <513498ED.1010901@embl.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Dear Francis, I just created the Jira entry, but I don't have much time now. I also prepared my code to simulate the operation while logging, but it is not ready yet and I am not sure I will have time soon to work on it. It looks indeed like a simple toString, and the code I use is the one I already posted: GregorianCalendar today = new GregorianCalendar(); Date todayDate = today.getTime(); MiscTools.insertSearchTerm(..., todayDate, ...); Then the insertSearchTerm is setting the todayDate in the DBRecord without changing it. For me, it looks like the column type is unknown when the method getValueString is called in DBDatabaseDriverOracle, so we get the toString, even if I have no idea how that could happen. I am just subclassing the class to be able to log that, aside of the test suggested by Rainer in getSQLDateTimeString. I am actually expecting to find that I am simply doing something very very stupid :). We will see... //Alain On 05/03/2013 09:09, Francis De Brabandere wrote: > Alain, > > One more question, is "Thu Feb 21 10:27:45 CET 2013" the toString() of > a date on your machine? I wonder if there is a code path that just > uses the toString for adding a value. > > Could you also post us the query for a correct call. Does it look like this? > INSERT INTO DATA( SEARCH_TERMS, IS_LOCAL, AT_TIME, FROM_IP) VALUES ( > 'test', 1, TO_DATE('2013-03-04 23:23:22', 'YYYY-MM-DD HH24:MI:SS'), > '0.0.0.0') > > > F >