Re: Question regard dates in Oracle database.

From: Hartlieb WILD <whsysana_at_ping.at>
Date: 1996/03/30
Message-ID: <N.033096.213706.89_at_ping.at>#1/1


Dear Ken,
as far as I know there are six special default values in FORMS: $$TIME$$, $$DATE$$ etc and
$$DBTIME$$, $$DBDATE$$ etc.

$$TIME$$ will obtain the local system time $$DBTIME$$ that one of the database.

If all your users refer to the same DB they will get the same time-stamp, the one of the database.

If this does not help you will have to add another column to your table SCHED with the code of the time-zone or the difference between the local time-zone and the GMT for instance. Thus you can evaluate a worldwide unique time-value.

Sincerely,
H. WILD

+==========================================================================+
| Hartlieb  WILD        Systemanalyse    Programmierung     EDV-Training   |
|                     allgemein beeideter gerichtlicher Sachverständiger   |
|                                                                          |
| A-6073 SISTRANS 280   e-mail:  whsysana_at_ping.at     Tel.: (++43) (0)512  |
| Austria               CompuServe:   100131,1552                 378 110  |
+==========================================================================+


> 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 Sat Mar 30 1996 - 00:00:00 CET

Original text of this message