Question regard dates in Oracle database.

From: Ken Denny <kedenny_at_mail.concentric.net>
Date: 1996/03/20
Message-ID: <4injm4$3m6_at_spectator.cris.com>#1/1


Right now I have an application, which has a table which keeps schedule information. To put it simply, someone schedules something for a group for a time period during which only members of that group are allowed to access it. The schedule table looks like:

create table sched (

   resource_id       varchar2(60),
   s_group           varchar2(30),
   begin_dt          date,
   end_dt            date

   );

Then when someone wants to access a resource, I use the following code:

begin

   select s_group into :grp from sched where resource_id = :resrc and

      begin_dt <= sysdate and end_dt >= sysdate;    if :grp != :mygroup then

      <don't allow them access>
   end if;
exception

   when no_data_found then

      null;
end;

This is working fine now, but I am concerned about the future. Right now everyone who uses the system is in the same time zone. I am wondering what it will be like when users in other time zones come on. This is UNIX so the operating system knows what time zone everyone is in, but I wonder if Oracle looks at that. Are dates stored in GMT or some kind of time zone-neutral format or will I have to write code to check what time zone I am running in and compensate for it in my code?

Thanks in advance
Ken Denny
Insight Industries, Inc.
RTP, NC #include <standard_disclaimer_regarding_opinions_etc> Received on Wed Mar 20 1996 - 00:00:00 CET

Original text of this message