- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Timezone 'problems'
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2007 06:42 PM
тАО04-18-2007 06:42 PM
A table (gmt_offset) was set up that has the value of ZERO during the winter months and 1 from March to October, which needs to be manually updated when the clocks go forward. Then this procedure converts things to GMT :
CREATE OR REPLACE PROCEDURE "UPDATE_TO_GMT" AS
BEGIN
--HARDCODED|0 SHOULD BE VALUE OF GMT_OFFSET TABLE
UPDATE SCAN_BUFFER_TABLE SET TIMEDATE = (TIMEDATE - (0 *(1/24)));
UPDATE TIP_BUFFER_TABLE SET TIMEDATE = (TIMEDATE - (0 *(1/24)));
UPDATE BSM_BUFFER_TABLE SET TIMEDATE = (TIMEDATE - (0 *(1/24)));
COMMIT;
END;
/
Unfortunately this manual change of the gmt_offset table is not satisfactory(so the new boss says!). We changed the procedure to the one attached but the result we get for the NZONES variable is '+00:00' and not '+01:00'. Can someone please suggest a better way of doing this? We do not have that knowledge to do it in any other way. Perhaps the person that designed the DB has done it this way because there was no other solution. Was he right or just wrong/lazy??
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-19-2007 08:12 PM
тАО04-19-2007 08:12 PM
Re: Timezone 'problems'
From 9i onwards, you can use the timestamp data type to store date-and-time information with associated time zone information. There's a brief introduction to the subject at http://www.devx.com/dbzone/Article/30501.
There is, of course, a caveat: if you use this functionality, you become dependent on Oracle patches for changes to the DST rules (such as the recent US DST change). Also, this will mean a change to the application tables, which may involve reworking some of your application...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-19-2007 10:17 PM
тАО04-19-2007 10:17 PM
Re: Timezone 'problems'
My problem is a procedure that we need to change so that it does the job that it should do, as per my post.
The select statement -
SELECT tz_offset(tzname) from V$TIMEZONE_NAMES;
gives me '+01:00', which is what I need as we are now in GMT+1. When the clocks change at the end of October, will this value change to '+00:00' ?? Does anyone know this answer, as this will be a way out, but only if it changes.
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-19-2007 11:06 PM
тАО04-19-2007 11:06 PM
Re: Timezone 'problems'
what does this query return?
select dbtimezone from dual;
revert.
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2007 01:07 AM
тАО04-20-2007 01:07 AM
Re: Timezone 'problems'
The querry returns '+01:00', which is what I need but will it return '+00:00' after the clocks change in October- which is GMT+0??
thanks
kyris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2007 02:41 AM
тАО04-20-2007 02:41 AM
SolutionI assume this means that the result of your select will change as DST does.