Converting datetime data types between OpenEdge and Oracle
- Last Updated: January 17, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
Syntax
Maintaining proper session time settings is critical to ensuring accurate datetime data type conversion between an OpenEdge application and an Oracle data source. The datetime data types are converted in either a default or non-default mode.
In the default setting, the client time zone context is set by the operating system on which the client operates, providing local context for timestamp values in an OpenEdge application. Oracle DataServer controls the OIC session time, setting it to Universal Coordinated Time (UTC).
In the non-default setting, you can set the application
time zone context via the OIC session time. You employ the non-default
setting through the -Dsrv startup parameter. Utilize
the following syntax:
|
The time zone value must be a string value in
a supported format such as "local", "-5.0", "-8.00", "dbtimezone",
or "Europe/London".
You may also choose
to invoke the -Dsrv native-tz-context parameter
without specifying a time zone value. If so, the parameter will
not set the default timezone session to UTC. This will allow the
OpenEdge client application to set the session time zone, such as through
the RUN STORED-PROC interface. The Oracle command
used to set the OCI session time zone is:
|
DATETIME or DATETIME-TZ datatypes
mapped to Oracle TIMESTAMP WITH TIME ZONE datatype
are required to set the session time zone using the -Dsrv
native-tz-context parameter only by specifying the time
zone value in any supported format accepted by Oracle TIME_ZONE setting
or it can also be set with the RUN STORED-PROC interface
using ALTER SESSION SET time_zone = 'time-zone-value' with
the time-zone-value in "TZH:TZM" format. Setting
the session time zone by other means may result in inaccurate data.