> We are using ingres 6.4/05(unix) openroad 3.5(nt).
> Our problem:
> On Ingres 6.4 all the date/times are stored in the database as GMT. When
> summertime occurs the time on the client automatically adjust the time to
> GMT+1. In the database the stored times are still GMT, also for those
> date/times record stored in the summertime.
> When we select date/time from the database, all the date/times stored before
> summertime occured, are displayed one hour wrong.
> Anyone having the same problem or solution?
>
> Regards
>
> Trygve Lemme
> Norwegian Police Data
We did deal with this problem where the student administation system stored
graduation date/time data. Obviously we wanted the time to remain static
regardless of daylight-savings.
What we did was store the date in the database as a varchar(25) field.
But as a result we did have Y2K compliance problems under Ingres 6.4/05 since
the year didn't contain a century. To force a century into the date string,
we used the following code:
/* to figure out the difference between our time and GMT time */
select interval('hours',date('now') - left(date_gmt('now'),20))
as h_gmt_offset;
h_gmt_hours = varchar(h_gmt_offset) + ' hours';
/* get the date using date_gmt since it contains the century */
update
set )
+ :h_gmt_hours), 20)
This was unnecessary and non-compliant under OpenIngres, since GMT in
OpenIngres also suffered from the effects daylight savings. Under OpenIngres
we're still storing the date as varchar(25), but obviously we don't need
to force a century into the date string.
- Sylvia
Ingres Q & A
Back to William's Home Page
© William Yuan 2000
Email William