The SM_DATETIME_FORMAT environment variable determines the default value for the si_i18n_datetime_format() function. The si_i18n_datetime_format() function is the basis of CI_Time and CI_Exception. In addition, CI_Logger uses CI_Time classes to render times. Therefore, the SM_DATETIME_FORMAT environment variable determines the default rendering for any and all timestamps.

The SM_DATETIME_FORMAT environment variable determines the default rendering for any and all timestamps. The SM_DATETIME_FORMAT environment variable can be set to several different values. If you do not set the value of the SM_DATETIME_FORMAT variable, then the default is SI_DAT_LONG.

The following examples show the output, based on the setting.

SM_DATETIME_FORMAT=SI_DAT_LOCALE_NEUTRAL
  1969/12/31 20:00:42
SM_DATETIME_FORMAT=SI_DAT_SHORT
  31/12/69 20:00
SM_DATETIME_FORMAT=SI_DAT_MEDIUM
  31 déc. 1969 20:00:42
SM_DATETIME_FORMAT=SI_DAT_LONG
  31 décembre 1969 20:00:42 HMG-05:00
SM_DATETIME_FORMAT=SI_DAT_FULL
  mercredi 31 décembre 1969 20:00:42 États-Unis (New York)
SM_DATETIME_FORMAT=SI_DAT_DEFAULT
  31 décembre 1969 20:00:42 HMG-05:00
SM_DATETIME_FORMAT=
  31 décembre 1969 20:00:42 HMG-05:00
SM_DATETIME_FORMAT=bogus

31 décembre 1969 20:00:42 HMG-05:00