|
2003-11-13
| ||
| 23:16 | • Closed ticket [745830ffff]: clock formating problem plus 2 other changes artifact: f53b982534 user: tomk | |
| 23:07 | • Ticket [745830ffff]: 1 change artifact: 4a453ecdf0 user: tomk | |
| 08:48 | • Ticket [745830ffff]: 1 change artifact: bddd780da2 user: dgp | |
|
2003-05-30
| ||
| 21:04 | • Ticket [745830ffff]: 4 changes artifact: 4f3ddfe686 user: kennykb | |
| 16:25 | • Ticket [745830ffff]: 2 changes artifact: deb885728a user: dkf | |
|
2003-05-29
| ||
| 23:50 | • New ticket [745830ffff]. artifact: f9c81fbcdc user: tomk | |
clock formating problem
Closed / Accepted745830ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 23 years ago
Descriptionplain2003-05-29 23:50:45
On HP-UX the '%k' produces the following result. % clock format [clock seconds] -format "%k %l %s" k l s % On Solaris I get the following. % clock format [clock seconds] -format "%k %l %s" 16 4 %s % The problem appears to be that some of the time formats are not part of the ANSI C standard for the strftime command and therefore are not support on all platforms. Note the following comment found on the OpenBSD's man page: The `%G', `%g', `%k', `%l', `%s', and `%+' conversion specifications are extensions. Some comments form George Staplin. Try: "make distclean && export CFLAGS=-DUSE_COMPAT && ./configure && make" and test the generated tclsh with %k. The configure command should probably check if %k and the other extensions work and enable USE_COMPAT if they don't. I would call it a bug if it isn't in the clock.n man page. The clock.n for 8.4.2 doesn't mention anything about the extensions, so I would label this a bug.
dkf Ticket [745830ffff]: 2 changes
[History diff]2003-05-30 16:25:08
kennykbplain2003-05-30 21:04:31
Logged In: YES user_id=99768 The reason that the native strftime is used on Unix platforms is so that the extended localization options %O and %E will be available. I had not realized that HP-UX is so far behind the current POSIX that it does not support %k, %l, or %s. I'd consider that a bug, since they are documented in the [clock] man page. George's suggestion that configure.in check whether the native strftime supports these options and fall back upon USE_COMPAT if they do not is a good one. A better one would be to localize compat/strftime.c so that we don't need to worry about all the platform differences. In fact, I had changed things in an early 8.4 beta so that compat/strftime.c was used on all platforms, but was forced to change back under pressure from German Tcl'ers on Linux, who needed localized dates. The real fix is possible, but necessitates sorting out some localization issues for the Tcl core. In essence, there are chicken-and-egg problems with the loading of message catalogs. There isn't anything insurmountable, it's just that the individuals involved haven't had the opportunity to sit down and have the necessary discussion.
dgp Ticket [745830ffff]: 1 change
[History diff]2003-11-13 08:48:41
tomk Ticket [745830ffff]: 1 change
[History diff]2003-11-13 23:07:06
tomk Closed ticket [745830ffff].
[History diff]2003-11-13 23:16:54
Log in (anonymous is fine) to add a comment.