Re: Question regard dates in Oracle database.

From: Chris Fischer <cfischer_at_nando.net>
Date: 1996/03/27
Message-ID: <4jceof$e8k_at_castle.nando.net>#1/1


tkyte_at_us.oracle.com (Thomas J Kyte) wrote:

>Scenario 2:
 

>I forget to do something my boss said to do by COB.
>He/She said to do it by 5pm or else.
>It is now 11pm, I didn't do it.
>I set the system clock on my pc to 4:30pm and execute the transaction.
>Wah-lah, the system thinks I did my work at 4:30pm.
 

>Doesn't it look odd to my boss the next when they KNOW they looked at 6pm to see
>if I did it (and I hadn't) but then the next day it says I did at 4:30pm?
 

>Relying on the client machine to provide the correct date is a fatal error (and
>a security risk, and error prone, and so on).....
 

>I can make my workstation say anytime I want, anytime I want it to. I can
>'fake' things.
 

>Wouldn't it be stranger to your your DBA in japan or germany that all accesses
>take place between 9am and 5pm their time? I kinda think that a server in
>ANYWHERE expecting hits from EVERYWHERE would be expecting hits 24 hours a day.

But Tom, your scenario assumes that the application is using the CLIENT time to post transactions. For the very reasons you indicate we ALWAYS use the server time. The way we handle clients in different time zones is as follows:

We set the database server time to the correct local time for the tz its located in. For each client, we know what time zone they are in. We post all transactions to the database using the server time. When I'm in say, Los Angeles and ask for all transactions I posted between 9am and 11am, we use the knowlege of the time zone they are in to ask for all transactions on the server (Eastern Time) that occurred between 12noon and 2pm. We adjust the time of the transactions as they are displayed to the clients.

Phew, now I'm exhausted!  

+------------------------------------------------------------+
| Chris Fischer                           cfischer_at_nando.net |
| Sr. Systems Analyst                    Work: (919)676-0062 |
| Toys "R" Us                                                |
+------------------------------------------------------------+
Received on Wed Mar 27 1996 - 00:00:00 CET

Original text of this message