Time Zone

What is the syntax for me to see the time zone in Oracle 10g?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
In what format?

There is:
select dbtimezone from dual;
select sessiontimezone from dual
You can select both in one query and see what is your requirement.

select dbtimezone,sessiontimezone from dual;
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

donvike1Author Commented:
I used both solutions and came up with different times - I'm located in Atlanta Georgia, Eastern time how do I find Eastern timezone as opposed the the number?

SQL> select dbtimezone from dual;


SQL> select sessiontimezone from dual;



In the above link look for this

     FROM dual;
donvike1Author Commented:
I would like to see Eastern, Pacific etc.

In the above look for this, which might help. You might have to change cities based on your requirement

SELECT FROM_TZ(CAST(TO_DATE('1999-12-01 11:00:00',
     'YYYY-MM-DD HH:MI:SS') AS TIMESTAMP), 'America/New_York')
     AT TIME ZONE 'America/Los_Angeles' "West Coast Time"

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
slightwv (䄆 Netminder) Commented:
Just to add:

select extract(timezone_region from systimestamp)  from dual;

This likely returns UNKOWN because:


The ambiguity arises because the time zone numerical offset is provided in the expression, and that numerical offset may map to more than one time zone region.

You will likely need some starting point referenced by anumoses
specify the regional timezone for the database.

donvike1Author Commented:
OK, let me explain this

My database wont open because of the Daylight saving change.

My database is on US/Pacific Time and I live in US/Eastern.  I'm trying to change my timezone to US/Eastern - what am I doing wrong.  See below:

[oracle@longhorns ~]$ emctl resetTZ agent
TZ set to US/Eastern
Oracle Enterprise Manager 10g Database Control Release
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
Updating /opt/app/oracle/product/10.2.0/localhost.localdomain_movies/sysman/config/emd.properties...
resetTZ failed.
The agentTZRegion in:
is not in agreement with what the agent thinks it should be.
Fix your environment.
Pick a TZ value that corresponds to time zone settings listed in:
[oracle@longhorns ~]$ US/Pacific
-bash: US/Pacific: No such file or directory
[oracle@longhorns ~]$ TZ set to US/Pacific
-bash: TZ: command not found
slightwv (䄆 Netminder) Commented:
>>My database wont open because of the Daylight saving change

That is a different question than the one asked.


What timezones are in that file?

donvike1Author Commented:
Thank you anumoses, this works - now how do I keep my database at this time so that I can open it?

SQL> SELECT FROM_TZ(CAST(TO_DATE('1999-12-01 11:00:00',
  2  'YYYY-MM-DD HH:MI:SS') AS TIMESTAMP), 'America/New_York')
  3  AT TIME ZONE 'America/Los_Angeles' "West Coast Time"

West Coast Time
donvike1Author Commented:
Sorry, let me rephrase that - how do I reset my database for America/Los_Angeles?  Right now it is reading as US/Eastern and I want it to continue as America/Los_Angeles.  Thank you so much for your assistance.
slightwv (䄆 Netminder) Commented:
>>Thank you anumoses, this works - now how do I keep my database at this time so that I can open it?
>>how do I reset my database for America/Los_Angeles?  

Again.  Different question than what was asked.  You should probably close the one asked by accepting the posts that helped you "to see the time zone in Oracle 10g" and open a new one for how to change it.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.