Informix Error -497
-497 LANG or LC_TIME environment variable invalid.
You specified an invalid value for a LANG or LC_TIME environment variable.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-497 is the LC_TIME counterpart of -492/-494/-495/-496: the same class of NLS-
environment-configuration error, here for the locale category governing date/time formatting
(month/day names, date formats), rather than collation, character classification, monetary, or
numeric formatting.
- A typo or misspelling in the
LANG/LC_TIMEvalue. - A locale string not supported by the server's NLS configuration, even if valid in general OS terms.
- Other locale categories correctly configured but
LC_TIMEoverlooked or mismatched — each is configured independently.
Solutions / Resolution
- Verify the exact value expected for the specific NLS-enabled database being connected to, consistent with the pattern for the other locale categories.
- Check for typos in the
LANG/LC_TIMEenvironment variable's current value. - Check all relevant locale categories together (
LC_COLLATE,LC_CTYPE,LC_MONETARY,LC_NUMERIC,LC_TIME) when configuring environment variables for an NLS-enabled database.
Examples
Checking current environment variable values
echo $LANG
echo $LC_TIME
-- compare against the exact value the target NLS-enabled
-- database actually requires for date/time formatting
Diagnostic Checks
- Check the current values of
LANGandLC_TIME. - Compare against the specific value the target database's NLS configuration requires.
Related Errors / Related Topics
- -496 — "LANG or LC_NUMERIC environment variable invalid." The identical underlying issue,
for
LC_NUMERICinstead ofLC_TIME. - -492 — "LANG or LC_COLLATE environment variable invalid." The identical underlying issue,
for
LC_COLLATEinstead ofLC_TIME.
Same pattern as the other NLS locale-category errors — check LC_TIME specifically, since each
category is configured independently of the others.