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

Home -> Community -> Usenet -> c.d.o.server -> Re: timezone

Re: timezone

From: Paul Eggert <eggert_at_twinsun.com>
Date: 1997/08/27
Message-ID: <5u28rc$qff$1@tattoo.twinsun.com>#1/1

"Mike Morgan" <mmorga2_at_amfam.com> writes:

> NEW_TIME only accepts AST?ADT (atlantic), BST/BDT (bering), CST/CDT (central),
> EST/EDT (eastern), GMT (greenwich), HST/HDT (alaska-hawaii), MST/MDT
> (mountain), NST (newfoundland), PST/PDT (pacific) and YST/YDT (yukon)
> according to my SQL manual. Since that narrows the scope to Western
> hemisphere, the output from a formatted "date" command would work.

Yes, if your application happens to run in the English-speaking part of North America, `date +"%Z"' should output one of the above strings. But if your application runs in Tokyo, `date +"%Z"' will output "JST", and (from what you write) this won't work be understood by SQL. Worse, if your application runs in Sydney, Australia, `date +"%Z"' will output "EST" (for Eastern Standard Time in Australia), and then SQL will assume you're in eastern North America and will silently be off by 15 or 16 hours.

In international applications, one should never use time zone abbreviations like "EST" for data interchange; they're too ambiguous. Use numeric offsets like "-0500" instead. If NEW_TIME accepts only time zone abbreviations, then it's broken and it ought to get fixed.

>What DO the folks in the Eastern hemisphere use for the "local" timezone
>values instead of the list above?

Whatever they feel like. E.g. people in China often use "CST" for China Standard Time. People in Singapore often use "SGT" for Singapore Time. (CST and SGT are both equivalent to +0800.) But there is no real standard. For more details on this subject (probably more than you want to know :-), see the timezone database at:
ftp://elsie.nci.nih.gov/pub/

By the way, the elsie database reports that

Maybe someone should tell Oracle or the SQL standardization committee about these recent (:-) changes. Received on Wed Aug 27 1997 - 00:00:00 CDT

Original text of this message

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