Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2003-07-31
21:42 • Closed ticket [672326ffff]: clock format depends on ENV-Variable LANG on SuSE.</... artifact: 79a6a24ac5 user: rmax
2003-02-25
16:25 • Ticket [672326ffff]: 1 change artifact: 33184b1416 user: dkf
2003-02-15
02:04 • Ticket [672326ffff]: 6 changes artifact: 29fb01b4d0 user: rmax
2003-01-28
08:49 • Ticket [672326ffff]: 5 changes artifact: db75b60dc7 user: hobbs
2003-01-22
16:38 • Ticket [672326ffff]: 3 changes artifact: ec94bb3f85 user: dkf
08:35 • New ticket [672326ffff]. artifact: 6810d4e211 user: xbone_ch

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.