Converting II_TIMEZONE_NAME to standard UTC

12 views
Skip to first unread message

Jade Clements

unread,
Jun 27, 2022, 6:51:43 PM6/27/22
to openroa...@googlegroups.com

Hi All

 

Is there a method available to convert the II_TIMEZONE_NAME value to standard UTC?

 

Eg

AUSTRALIA-VICTORIA

 

To

 

 

 

 

Thanks!

 

 

Regards,

 

Jade

Jade Clements
Developer
P
M
Fusion5
Fusion5 | Level 27, 570 Bourke Street, Melbourne, 3000, Australia
This email and any attachments are confidential and intended exclusively for the person to whom the email is addressed. Please see our Privacy Policy

ID0EC

Paul White

unread,
Jun 27, 2022, 7:48:03 PM6/27/22
to openroa...@googlegroups.com

Hi Jade,

The UTC offset is going to vary depending on the time of year.

Does this work for you?


* select date('now') - date(varchar(date('now')) + ' GMT') \g
Executing . . .
┌─────────────────────────┐
│col1                     │
├─────────────────────────┤
│-10 hrs                  │
└─────────────────────────┘

* select date('25/12/2022 09:00') - date(varchar(date('25/12/2022 09:00')) + ' GMT') \g
Executing . . .
┌─────────────────────────┐
│col1                     │
├─────────────────────────┤
│-11 hrs                  │
└─────────────────────────┘

$ II_TIMEZONE_NAME=Australia-South sql iidbdb
* select date('now') - date(varchar(date('now')) + ' GMT') \g
Executing . . .
┌─────────────────────────┐
│col1                     │
├─────────────────────────┤
│-9 hrs -30 mins          │
└─────────────────────────┘







On 28/06/2022 8:51 am, Jade Clements wrote:

Hi All

 

Is there a method available to convert the II_TIMEZONE_NAME value to standard UTC?

 

Eg

AUSTRALIA-VICTORIA

 

To

 

 

 

 

Thanks!

 

 

Regards,

 

Jade


Paul

&

Bodo Bergmann

unread,
Jun 28, 2022, 4:58:21 AM6/28/22
to openroa...@googlegroups.com

Hi Jade,

 

I am not sure what you mean with “standard UTC”.

Do you want your set your time zone to UTC (= GMT), then you’ll have to set II_TIMEZONE_NAME to GMT.

 

Or do you want to use a time zone name similar to those in the Windows settings – containing the name of a city?
In this case you could use IANA time zone names (in OpenROAD 11.x), e.g. Australia-Melbourne
(see https://docs.actian.com/ingres/11.2/#page/Install/IANA_World_Regions_and_Time_Zone_Names.htm).

Be aware that when using an IANA time zone name then any DBMS server you try to access must also support IANA time zone names.
That is, your servers must also be 11.x versions.
Otherwise you’ll have to stay with Ingres time zone names (see https://docs.actian.com/ingres/11.2/#page/Install/Time_Zone_Names.htm#ww241858
).

 

Kind regards,

Bodo.

 

Bodo Bergmann
Engineering Architect
Actian, An HCL Company | OpenROAD Engineering
www.actian.com
GESELLSCHAFTSANGABEN: Actian Germany GmbH | Sitz der Gesellschaft: Halenreie 42, 22359 Hamburg | Geschäftsführung: Stephen Padgett, Marc Monahan | Handelsregister: Amtsgericht Hamburg | HRB 135991 | USt-IdNr: DE252449897

--
You received this message because you are subscribed to the Google Groups "OpenROAD Users Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openroad-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openroad-users/SY6PR01MB735112D88E5CC1F0B54D24CA9DB99%40SY6PR01MB7351.ausprd01.prod.outlook.com.

Bodo Bergmann

unread,
Jun 28, 2022, 5:07:19 AM6/28/22
to openroa...@googlegroups.com

Forgot to mention:

 

If you want to use a fixed UTC offset instead (e.g. 10 hours east of GMT – independent on any daylight saving time),
then you can set this by using a II_TIMEZONE_NAME value of

  • GMT10 (Ingres time zone name) or
  • Etc-Gmt-10 (IANA time zone name)

See https://docs.actian.com/ingres/11.2/#page/Install/Time_Zone_Names.htm#ww241865

 

Bodo.

Bodo Bergmann

unread,
Jun 28, 2022, 8:28:23 AM6/28/22
to openroa...@googlegroups.com

Additional info from Paul Mason, one of our Ingres Engineers:

 

Looks like you might be wanting convert the legacy Ingres time zone names (of which AUSTRALIA-VICTORIA is one) to the equivalent IANA based one, which are city based.                                                                                                                                                                                                                                           

You can look up the mapping from legacy Ingres time zone names to IANA time zone name in:

https://docs.actian.com/ingres/11.2/#page/Install/Time_Zone_Name_Mappings.htm

Jade Clements

unread,
Jun 29, 2022, 6:09:51 PM6/29/22
to openroa...@googlegroups.com

Thanks Paul!

 

Jade Clements
Developer
P
M
Fusion5 | Level 27, 570 Bourke Street, Melbourne, 3000, Australia
This email and any attachments are confidential and intended exclusively for the person to whom the email is addressed. Please see our Privacy Policy

ID0EC

--

You received this message because you are subscribed to the Google Groups "OpenROAD Users Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openroad-user...@googlegroups.com.

Jade Clements

unread,
Jun 29, 2022, 6:10:09 PM6/29/22
to openroa...@googlegroups.com

Thanks Bodo!

 

Jade Clements
Developer
P
M
Fusion5 | Level 27, 570 Bourke Street, Melbourne, 3000, Australia
This email and any attachments are confidential and intended exclusively for the person to whom the email is addressed. Please see our Privacy Policy

ID0EC
Reply all
Reply to author
Forward
0 new messages