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
