Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Storing timezones

Status
Not open for further replies.

ziploc1010

Programmer
Apr 14, 2001
13
US
I would like to store info in a date/time field. However, in addition to the date and time, I also need to know what timezone this info is associated with. Is there a way to also store a time zone in a date/time for a field?

Thanks in advance,
Matthew
 
Couldn't you have a table with locations and the time difference and then just store all times as GMT? The TimeDiff would be the number of hours off of GMT.

For data input, you would have to convert the date/time from local to GMT and the same for displaying of times. The military does that a lot.

tblTimeZones
Location VARCHAR2(25)
TimeDiff NUMBER

I would give you example data, but I don't want to embarrass myself by putting the wrong value for a time zone.

Just a suggestion... Terry M. Hoey
th3856@txmail.sbc.com
While I don't mind e-mail messages, please post all questions in these forums for the benefit of all members.
 
I think Terry's right. I don't believe that Oracle 8i dates have any ability to store time zones, so you will have to handle this in your application: store something equivalent to time zone in another column apart from the date.

I've heard that this is changing in Oracle 9i. I don't know the details, but it's something to keep in mind.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top