cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Reich <markus.re...@markusreich.at>
Subject Re: Set timezone on connection
Date Sun, 02 Aug 2015 08:54:46 GMT
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 <andrus@objectstyle.org>:

> > 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 <markus.reich@markusreich.at>
> 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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message