Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-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 3A5731824C for ; Tue, 4 Aug 2015 11:07:51 +0000 (UTC) Received: (qmail 93171 invoked by uid 500); 4 Aug 2015 11:07:46 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 93163 invoked by uid 500); 4 Aug 2015 11:07:46 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 93150 invoked by uid 99); 4 Aug 2015 11:07:45 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Aug 2015 11:07:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 5D80CDA363 for ; Tue, 4 Aug 2015 11:07:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.001 X-Spam-Level: **** X-Spam-Status: No, score=4.001 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, KAM_LAZY_DOMAIN_SECURITY=1, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id mdACOfIe91oS for ; Tue, 4 Aug 2015 11:07:30 +0000 (UTC) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 3B73A2100B for ; Tue, 4 Aug 2015 11:07:30 +0000 (UTC) Received: by wijp15 with SMTP id p15so683978wij.0 for ; Tue, 04 Aug 2015 04:07:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=T93Iaso0IUZ0hnnXlqz4yjGqIH9dFNfvWexTwKd5nRM=; b=DVOwoH7hDXtIfFte89fK/lmSuoUTKFbPINlX+GHzXEXmJlb14Px7YdfbbV8OFEKgNJ IT+qP9Cb82g47fJzMDzKvClXSq2x7G49byhIokDMuWoKvLuuo7TUgMOPd8vTsFlItBMj kU3ioqsYUFd+6o0wEEUUwVXgx3Ai0CTQZ/OakgMuSmjT6BpUlFNSHJj1KXGKl7lXv9+1 ++pmmE0xnDyF27PJHA0o9Mxj1+bgrfRdbbNA0SPDgoso4Hz55iLVYQhKm96R9QJuldZD qVT2ssyqyu6jXcRaqv0mvvNvqAPnKxeDyy8MkT4nf6ncVKbw2YmdUfgUBugag/13h4Oy RFHw== X-Gm-Message-State: ALoCoQn5BUVFJS6QEjB02poE9T4VPfK7np4X3huOVBGRgmFUImA3g4Wk2lko5DOdzAYawaIMSneD X-Received: by 10.180.107.70 with SMTP id ha6mr6656643wib.20.1438686448647; Tue, 04 Aug 2015 04:07:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.129.203 with HTTP; Tue, 4 Aug 2015 04:07:09 -0700 (PDT) In-Reply-To: References: <0E2E9985-C47E-4EDB-A173-DD43797AD2F4@objectstyle.org> From: Michael Gentry Date: Tue, 4 Aug 2015 07:07:09 -0400 Message-ID: Subject: Re: Set timezone on connection To: Cayenne Users Content-Type: multipart/alternative; boundary=e89a8f234d09b71ee4051c7a4a7a --e89a8f234d09b71ee4051c7a4a7a Content-Type: text/plain; charset=UTF-8 Hi Markus, If I'm reading the JavaDocs correctly for OracleConnection, then it is simply an extension of JDBC's Connection, which means you'd probably run into issues when using a connection pool, as you are only setting the time zone on one connection. Also, many connection pools will close idle connections, and I suspect any time zone information would be lost for that connection as well. mrg On Sun, Aug 2, 2015 at 4:54 AM, Markus Reich wrote: > Hi, > > here is an example > > conn = ((DataContext) > > context).getParentDataDomain().getDefaultNode().getDataSource().getConnection(); > OracleConnection c = (OracleConnection) conn.getMetaData().getConnection(); > TimeZone tz = TimeZone.getTimeZone("Europe/Berlin"); > c.setDefaultTimeZone(TimeZone.getTimeZone("GMT+0" + tz.getOffset(new > Date().getTime()) / 1000 / 3600 + ":00")); > > 2015-07-31 19:25 GMT+02:00 Andrus Adamchik : > > > > We found a possibility in setting a certain timezone on the java > > connection. > > > > Could you show an example of this? > > > > > > > On Jul 31, 2015, at 5:18 PM, Markus Reich > > > wrote: > > > > > > Hi, > > > > > > we've some problems with oracle and timzone in combination with > daylight > > > savings :-( > > > When I search the web to this topic, I can see that we are not the only > > one > > > having problems concerning oracle and daylight saving ;-) > > > But it seems that there's no proper solution to fix it :-( > > > > > > We found a possibility in setting a certain timezone on the java > > connection. > > > My question what would be the best solution in cayenne to set the > > timezone > > > on the based java connection object? > > > > > > br > > > Meex > > > > > > > -- > *Markus Reich* > Waldweg 62 > 6393 St. Ulrich am Pillersee > www.markusreich.at / www.meeximum.at > markus.reich@markusreich.at > --e89a8f234d09b71ee4051c7a4a7a--