db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendleton.de...@gmail.com>
Subject Re: Format the timestamp value
Date Wed, 02 Jun 2010 02:56:14 GMT
> Hence the difference is around 17970 seconds.

Looks pretty close to 5 hours. (5*3600=18000). Is 5 hours approximately
your TZ correction from GMT?

> Does anyone implement any other formula for getting a more accurate value.
> I am new to derby, so pls suggest how do i consider/check the timezone . Is
> this difference due to timeze? if yes then how can I change me query to
> consider that.

I'm not sure it's very easy to control the TZ that Derby's CURRENT_TIMESTAMP uses.

You could try setting TZ=GMT when running Derby, to see if the answer changes,
and if the new result is closer to what you get with MYSQL.

To really get control over these behaviors, though, you probably will
need to write your own date/time formatting code. I understand that if
you are working in PHP this is going to be a challenge; Derby is most
easily used in a native Java configuration, unfortunately.

You might try asking these questions on derby-users, rather than on
derby-dev, as derby-dev tends to attract mostly Derby developers, while
derby-users has lots of people who have dealt with Derby application
development issues.

thanks,

bryan

Mime
View raw message