dbTalk Databases Forums  

Get timezone from Ingres for current session

comp.databases.ingres comp.databases.ingres


Discuss Get timezone from Ingres for current session in the comp.databases.ingres forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Stina
 
Posts: n/a

Default Get timezone from Ingres for current session - 01-21-2004 , 08:47 AM






Hi,
does anyone know if it is possible to read the timezone for the
current database session in Ingres? I have an application developed in
C where I want to read the current database time zone.

I have not found anything on dbmsinfo or inquire_sql as I hoped.

Thanks,
Stina

Reply With Quote
  #2  
Old   
Roy Hann
 
Posts: n/a

Default Re: Get timezone from Ingres for current session - 01-21-2004 , 10:31 AM






"Stina" <stina76 (AT) yahoo (DOT) com> wrote

Quote:
Hi,
does anyone know if it is possible to read the timezone for the
current database session in Ingres? I have an application developed in
C where I want to read the current database time zone.

I have not found anything on dbmsinfo or inquire_sql as I hoped.
I can't think of any way to get the timezone name.

However, I believe you can return the current date/time in GMT using
date_gmt('now'), so you can compute the difference between GMT and local
time, if that helps:

select date('now')-date_gmt('now)

Roy Hann (rhann at rationalcommerce dot com)
Rational Commerce Ltd.
www.rationalcommerce.com
"Ingres development, tuning, and training experts"





Reply With Quote
  #3  
Old   
David Richard
 
Posts: n/a

Default RE: Get timezone from Ingres for current session - 01-21-2004 , 10:45 AM



Some ideas to try:-

1. capture the output of the following system command:-
ingprenv II_TIMEZONE_NAME

2. Work it out by calculating the timezone offset relative to Zulu time.
(You will need to take into account daylight saving time):-
select date('now') - date(left(right(date_gmt('now'), 14), 8)) as gmt_offset

3. Wait for someone to point out a dbmsinfo or an IMA request


************************************************** **********************
DISCLAIMER
The information contained in this e-mail is confidential and is intended
for the recipient only.
If you have received it in error, please notify us immediately by reply
e-mail and then delete it from your system. Please do not copy it or
use it for any other purposes, or disclose the content of the e-mail
to any other person or store or copy the information in any medium.
The views contained in this e-mail are those of the author and not
necessarily those of Admenta UK Group.
************************************************** **********************



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.