Menu

#1898 [clock format] doesn't support locales

obsolete: 8.4a5
closed-fixed
5
2002-06-26
2002-06-07
No

[clock format] always returns day and month names in
Engish, although it uses strftime() internally which
supports locales, but only if the LC_TIME locale
category has been initialized from the respective
environment variable(s) before.

I first thought of adding a call to
setlocale(LC_TIME,"") or setlocsl(LC_ALL, "") to
unix/tclUnixInit.c, but that would have meant, that a
script can't change the locale it inherited from it's
parent process.
This in turn broke many of the tests in clock.test when
"make test" was called from within a German locale.

Therefore I added the setlocale(LC_TIME,"") call to
tclUnixTime.c just before strftime() is being called,
so that changing env(LC_CTIME) from within a script
changes gets reflected in [clock format] immediately.

Discussion

  • Reinhard Max

    Reinhard Max - 2002-06-07

    locale support for [clock format]

     
  • Reinhard Max

    Reinhard Max - 2002-06-07
    • labels: --> 06. Time Measurement
    • assigned_to: nobody --> kennykb
     
  • Reinhard Max

    Reinhard Max - 2002-06-26

    Logged In: YES
    user_id=124643

    Applied the patch to 8.4b1.

     
  • Reinhard Max

    Reinhard Max - 2002-06-26
    • status: open --> closed-fixed