postgre 7.3 / JSTL problem

From: Charl Gerber <charlgerber(at)yahoo(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: postgre 7.3 / JSTL problem
Date: 2005-03-07 19:07:44
Message-ID: 20050307190745.48833.qmail@web41209.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Prasanth 2005-03-07 19:20:49 Re: java.sql.date insert as null
Previous Message Mican Bican 2005-03-07 19:07:08 java.sql.date insert as null