DATETIME-TZ and timezone questions...

kolonuk

Member
Hi All,

We are again looking at timezones and I have a quick question that maybe someone can answer...

We have a system that is (currently) accessible across 3 different timezones (GMT,-4h and -5h), and have just about figured out a process to store/retrieve the correct date/time for all uses, regardless of timezone (for example a picklist printed at 1521 GMT reports 1021 in the -5h timezone - you get the idea)

Using the
Code:
NOW
function, we can store the date, time and timezone information into the database and use various
Code:
DATETIME-TZ
combinations to extract the date and time for display.

My question is, while a
Code:
DATETIME-TZ
field in the database is indexable correctly, what impact does it have over normal date/time (inte) fields? For example, how does it behave when I need to find a particular date, regardless of time or timezone? How is it sotored in the DB - text, inte, lots of inte's, or a binary string, etc.?

Or doesn't it matter?

Essentially, before we go ahead and start changing about 100 or so tables and around 2000 ish .p files, will it make everything break or be noticeably slower?

Any thoughts?
 
There is system time coded in ms from beginning of some date.
So datetime-tz is just representation of this sytem time in some format.
So I guess it stored like integer.
To find out particular date you have to query like
where table.dt >= date-from and table.dt < date-from + 1
default time is 0.00.00 when converting from date to datetime.
 
Top