The USE_DTENV environment variable

To support compatibility with earlier versions, Informix® ESQL/C uses the USE_DTENV environment variable to activate support for non-ANSI date-time formats.

When the USE_DTENV environment variable is enabled, the following order or precedence is used:
  1. DBTIME
  2. GL_DATETIME
  3. CLIENT_LOCALE
  4. LC_TIME
  5. LANG (if LC_TIME is not set)
  6. ANSI format

When enabled, the USE_DTENV environment variable is passed from the ESQL/C program to the database server. Enabling it for the database server only has no effect. You must set it for the ESQL/C client program, which then passes it to the database server.

If the database server does not support non-ANSI date-time formats, do not set the USE_DTENV environment variable for the ESQL/C client program.

You must set this environment variable to display localized DATETIME values correctly in a database that uses a non-default locale, and for which the GL_DATETIME environment variable has a non-default setting.