Re: Date time problem with timstamp with no timezone data

Поиск
Список
Период
Сортировка
От David A. Bartmess
Тема Re: Date time problem with timstamp with no timezone data
Дата
Msg-id 1026451033.2522.3.camel@Dingo.home
обсуждение исходный текст
Список pgsql-jdbc
From the code you sent, it looks like you are getting the date from the
database, then updating the record with the same date. This is what I
expected from what you had said.

OK, so you're setting the date with the setTimestamp, and getting it
with the getTimestamp, so I don't see why it's updating with a timezone
differential.

I created a small test program (attached), so you can see what I did.
Feel free to take it and run with it.. <grin>

Sorry I couldn't pinpoint the trouble, but maybe it's in the database
setup. If it's expecting a GMT timestamp, and you're giving it a local
timestamp, then that would account for it.

Good luck!

On Thu, 2002-07-11 at 14:28, Yuva Chandolu wrote:
> Hi David,
>
> Here is the code(jsp), pls advise me...
> <SNIP>
>
> Thanks
> Yuva
>
>
> -----Original Message-----
> From: David A. Bartmess [mailto:dingodave@edingo.net]
> Sent: Thursday, July 11, 2002 8:46 AM
> To: Yuva Chandolu
> Subject: Re: [JDBC] Date time problem with timstamp with no timezone
> data type
>
>
> Without seeing the actual code sample, I'd say that the format you're
> using is wrong, and instead of converting the GMT to local time, it's
> adding it to the time.
>
> Supply the relevant code sample, and I'll confirm that.
>
> On Thu, 2002-07-11 at 02:12, Yuva Chandolu wrote:
> > Hi,
> >
> > We have weiered problem with one timestamp(without timezone) data type
> > column(updated_date) in one table.  We insert a row into this table with
> > current time once and susequently update it many times with current time.
> > What happens is with each update the updated_date is increased by 7 hours.
> > We are in PDT timezone and for initial insert +7 hours is fine but
> > subsequent updates increasing it by +7 hours is wiered. What should we do
> > here?
> >
> > We are using stable pgjdbc2.jar and we are using postgres7.2.1.
> >
> > Thanks
> > Yuva
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 4: Don't 'kill -9' the postmaster
> >
> --
> David A. Bartmess
> Software Configuration Manager / Sr. Software Developer
> eDingo Enterprises
> http://edingo.net
>
> But one should not forget that money can buy a bed but not sleep, finery
> but not beauty, a house but not a home, medicine but not health,
> luxuries but not culture, sex but not love and amusements but not
> happiness.
>
--
David A. Bartmess
Software Configuration Manager / Sr. Software Developer
eDingo Enterprises
http://edingo.net

But one should not forget that money can buy a bed but not sleep, finery
but not beauty, a house but not a home, medicine but not health,
luxuries but not culture, sex but not love and amusements but not
happiness.


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Yuva Chandolu
Дата:
Сообщение: Re: Date time problem with timstamp with no timezone data
Следующее
От: "Felipe Schnack"
Дата:
Сообщение: ConnectionPool