pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedpostgre 7.3 / JSTL problem
3+ messages / 2 participants
[nested] [flat]
* postgre 7.3 / JSTL problem
@ 2005-03-07 19:07 Charl Gerber <charlgerber@yahoo.com>
2005-03-07 20:06 ` Re: postgre 7.3 / JSTL problem Oliver Jowett <oliver@opencloud.com>
0 siblings, 1 reply; 3+ messages in thread
From: Charl Gerber @ 2005-03-07 19:07 UTC (permalink / raw)
To: pgsql-jdbc
Hi,
I'm using Postgre 7.3.4 with the build 113 JDBC
drivers. I am using JSTL (jakarta implementation,
1.0.6) in a web-app running on Tomcat 4.1.30. When I
start my application (in a ServletContextListener), I
have this statement:
Config.set(event.getServletContext(),
Config.FMT_TIME_ZONE, Constants.TIMEZONE);
Where Constants.TIMEZONE = "Europe/Amsterdam"
The server is on New Zealand time, 12 hours ahead of
Amsterdam time.
I have database timestamp fields which are defined as
"DEFAULT now()".
When I browse the database with an explorer tool, the
timestamp is shown in the New Zealand time, eg "07 Mar
06:00". Local (Amsterdam) time is then 06 Mar 18:00.
However, if I try to display the timestamp with JSTL
<fmt:formatDate value="${row.msgTime}" pattern="dd MMM
HH:mm"/>
the time is shown as 07 Mar 12:00. Ie 6 hours before
NZ time instread of 12 hours later.
Any ideas? A bug in the driver? JSTL settings? The
server? My code? :)
Thanks
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: postgre 7.3 / JSTL problem
2005-03-07 19:07 postgre 7.3 / JSTL problem Charl Gerber <charlgerber@yahoo.com>
@ 2005-03-07 20:06 ` Oliver Jowett <oliver@opencloud.com>
0 siblings, 0 replies; 3+ messages in thread
From: Oliver Jowett @ 2005-03-07 20:06 UTC (permalink / raw)
To: Charl Gerber <charlgerber@yahoo.com>; +Cc: pgsql-jdbc
Charl Gerber wrote:
> I have database timestamp fields which are defined as
> "DEFAULT now()".
timestamp with timezone or timestamp without timezone?
> Any ideas? A bug in the driver? JSTL settings? The
> server? My code? :)
It's pretty much impossible to say unless you can narrow this down to
some test code that we can try (ideally, code that talks JDBC directly).
-O
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: postgre 7.3 / JSTL problem
@ 2005-03-07 20:21 Charl Gerber <charlgerber@yahoo.com>
0 siblings, 0 replies; 3+ messages in thread
From: Charl Gerber @ 2005-03-07 20:21 UTC (permalink / raw)
To: Oliver Jowett <oliver@opencloud.com>; +Cc: pgsql-jdbc
I tried not setting a timezone and then doing:
SET TIME ZONE 'Europe/Amsterdam'
In both cases the JSTL <fmt:formatDate did not work. I
might have to try with no timezone settings in the
code.
In the second case, after setting the timezone, it
showed the time 7 hours too early.... hmmm. weird.
--- Oliver Jowett <oliver@opencloud.com> wrote:
> Charl Gerber wrote:
>
> > I have database timestamp fields which are defined
> as
> > "DEFAULT now()".
>
> timestamp with timezone or timestamp without
> timezone?
>
> > Any ideas? A bug in the driver? JSTL settings? The
> > server? My code? :)
>
> It's pretty much impossible to say unless you can
> narrow this down to
> some test code that we can try (ideally, code that
> talks JDBC directly).
>
> -O
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2005-03-07 20:21 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-03-07 19:07 postgre 7.3 / JSTL problem Charl Gerber <charlgerber@yahoo.com>
2005-03-07 20:06 ` Oliver Jowett <oliver@opencloud.com>
2005-03-07 20:21 Re: postgre 7.3 / JSTL problem Charl Gerber <charlgerber@yahoo.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox