Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: gmt date - how?

Re: gmt date - how?

From: Peter Marksteiner <pm_at_univie.ac.at>
Date: 18 Jun 1999 16:39:57 GMT
Message-ID: <7kdsot$2iou$1@www.univie.ac.at>


Gerhard Kutzelnigg <gerhard_at_uni-x.net> wrote:
: I just want a client program (WinNT) to decide how the date should be
: converted for finally viewing the table data, but the date itself should
: be GMT in the database. How can I do so? Is there a way to determine the
: local time zone? I found a function called NEW_TIME that converts date
: to different time zones, but this function does not tell me how the date
: field is internally stored in oracle. I'd like to have it internally
: stored in GMT and not CET (here in Germany...)

The timezone is not part of the DATE datatype, therefore you can't store times in GMT or any other timezone. To keep a database consistent across several timezones you have to declare arbitrarily that all date fields in the database are supposed to refer to some definite time zone (say, GMT), and force all clients located in different timezones to add or subtract the corresponding offset.

By the way, I think it was rather a bad design decision not to include the timezone in the DATE datatype. The Unix epoch, for example, which uses 1 Jan 1970 0:00 GMT as reference for all time calculations, is much cleaner.

--
Peter Marksteiner
Vienna University Computer Center Received on Fri Jun 18 1999 - 11:39:57 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US