Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Daylight savings and timezones
If you're on Unix, you need to set the TZ environment variable to the timezone you want for the Oracle account in the file $HOME/.profile. Each Unix account could be a different local time zone. When you startup Oracle, it should be in that time zone.
"Jeffrey C. Dege" <jdege_at_jdege.visi.com> wrote in message
news:slrn8h0vo9.gg3.jdege_at_jdege.visi.com...
> A customer has a system that needs to record a log of events on the
> production line. Each event needs to be timestamped, and the timestamps
> need to be monotonically increasing. That is, we'll be doing calculations
> on the length of processes by subtracting timestamps.
>
> The difficulty is that this is a system that will be up 24x7, and will
> be running during the daylight saving stime conversions.
>
> My initial approach would be to keep times in GMT, but looking at Oracle's
> date support, I'm not sure how I would do it. SYSDATE seems to return
> local time, and I don't see an easy way to find out what Oracle thinks
> the current time zone is.
>
> Be that as it may, this can't be an uncommon problem, how do people
> usually deal with it?
>
> --
> Of all tyrannies, a tyranny exercised for the good of its victims may be
the
> most oppressive. It may be better to live under robber barons than under
> omnipotent moral busybodies. The robber baron's cruelty may sometimes
sleep,
> his cupidity may at some point be satiated; but those who torment us for
our
> own good will torment us without end, for they do so with the approval of
> their consciences.
> - C. S. Lewis
Received on Mon May 08 2000 - 00:00:00 CDT