(Ingres) date_trunc on hour/minutes/seconds always subtracting 7 hours from result
A Java SQL client for any JDBC compliant database
Brought to you by:
colbell,
gerdwagner
Running the following query:
select '31-Oct-2000 08:55:12', date_trunc('HOURS','31-Oct-2000 08:55:12'), date_trunc('MINUTES','31-Oct-2000 08:55:12'), date_trunc('SECONDS','31-Oct-2000 08:55:12');
will yield:
col1 | col2 | col 3 | col4
------------------------------- | -------------------------------- | ---------------------------------- | --------------------------------
31-Oct-2000 08:55:12 | 2000-10-31 01:00:00.0 l 2000-10-31 01:55:00.0 | 2000-10-31 01:55:12.0
It might be useful to know that
select date('now')
yields the correct time.