Skip to content
Tcl Source Code View Ticket
Login

View Ticket

clock format depends on ENV-Variable LANG on SuSE.

Closed / Invalid672326ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 23 years ago
Descriptionplain2003-01-22 08:35:11
I've also submitted this to SuSE, since I'm not sure where       
the problem really is.       
We're experiencing the problem on our SuSE-boxes, 
versions 7.1 and 8.1 
How to reproduce :      
in a shell, do "export LANG=en_US", then start tclsh.      
Enter the command "clock format [clock seconds]".      
Result:  Wed Jan 22 09:25:08 AM CET 2003     
Now, exit tclsh, do "export LANG=de_CH", then again,     
start tclsh. Command "clock format [clock seconds]"...     
Result:  Mit Jan 22 09:25:54 CET 2003    
  
It's only on SuSE that this happens, it seems...
dkf Ticket [672326ffff]: 3 changes [History diff]2003-01-22 16:38:46
hobbsplain2003-01-28 08:49:36
Logged In: YES 
user_id=72656

Are you saying that the localization of the clock output is 
undesirable and viewed as a bug?  If you want clock output 
that is locale-independent, just use the number-based 
formats (with -format), or use just [clock seconds].
rmaxplain2003-02-15 02:04:06
Logged In: YES 
user_id=124643

Please re-check the behaviour on your 7.1 box.. Unless you
have updated Tcl 8.4.0 or newer, [clock format] can't be
localized.

This is not a bug of SuSE Linux, but a feature of Tcl 8.4
and newer. If other distributions don't show this behaviour,
either their locale support is broken, or their Tcl packages
are outdated.

If you don't want the output of [clock format] to depend on
the user's environment, you can set env(LC_TIME) from within
your Tcl program to the locale that should always be used,
e.g. POSIX.
dkf Ticket [672326ffff]: 1 change [History diff]2003-02-25 16:25:07
rmaxplain2003-07-31 21:42:01
Logged In: YES 
user_id=124643

I think we can close this.
Log in (anonymous is fine) to add a comment.