At 16:50 -0700 1/10/01, jie zhang wrote: >Somehow, TZ is not recognized in my system. I am using oracle 8.1.7 on >solaris 5.8. >Did you actually tried out in your system ? Do I need to >set up any NLS variable in order to use the 'TZ' keyword ?
I'm afraid that Oracle's handling of timezones is primitive at best. There is no date format modl string for time zone and the function new_time() only recognises a very Americano-centric set of zones. You can though use the environment variable TZ (on SVR4 systems and BSD if memory serves) to establish the zone of the session: TZ=GMT+8 sqlplus scott/tiger or $ENV{TZ} = 'PST8PDT'; $dbh = DBI->connect("DBI:Oracle:","scott","tiger"); You can find the available zones in /usr/share/lib/zoneinfo on SVR4 or BSD. From there, you can 'mask' the timezone in your date string like so: insert into datetest values ( to_date('Thu Sep 20 15:03:10 PDT 2001' , 'Dy Mon DD HH24:MI:SS --- YYYY') ) As an aside, most other RDBMSs support timezones in the data, but Oracle is just a bit slow on this. Regards Paul Miller -- - Carib Data Limited <mailto:[EMAIL PROTECTED]> <http://www.caribdata.co.uk>