Clock scan doesn't like some 12am values.
Closed / Fixed1090413fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2004-12-23 15:21:41
It seems "clock scan" doesn't properly recognize some 12am hour variants when using the format "clock scan hhmm". The examples listed below are from 8.5a2 on WinXP. I also found the similar behavior with 8.4.7 on Solaris- sparc. Listed below are examples of some that work and do not work properly: % info patchlevel 8.5a2 % % clock format [clock scan 0030] -format "%I:%M%p" unable to convert date-time string "0030" % clock format [clock scan 1030] -format "%I:%M%p" 10:30AM % clock format [clock scan 0130] -format "%I:%M%p" 01:30AM % clock format [clock scan 130] -format "%I:%M%p" 01:30AM % clock format [clock scan 30] -format "%I:%M%p" unable to convert date-time string "30" % clock format [clock scan 00:30] -format "%I:%M%p" 12:30AM % clock format [clock scan 00:00] -format "%I:%M%p" 12:00AM % clock format [clock scan :00] -format "%I:%M%p" unable to convert date-time string ":00" % clock format [clock scan 000] -format "%I:%M%p" 12:00AM % clock format [clock scan 0000] -format "%I:%M%p" 12:00AM % clock scan 0000 1103695200 % clock scan 0030 unable to convert date-time string "0030" % clock scan 0000 1103695200 % clock scan 000 1103695200 % clock scan 030 unable to convert date-time string "030" % clock scan 00 1103695200 % clock scan 30 unable to convert date-time string "30" % clock scan 0 1103695200 % clock scan 01 1103698800 % clock format [clock scan 01] -format "%I:%M%p" 01:00AM % clock format [clock scan 0001] -format "%I:%M%p" 01:00AM % -Matt
kennykbplain2004-12-30 05:20:54
Logged In: YES user_id=99768 [clock scan] was using the numeric value of the string, '0030', rather than its length, to decide what sort of thing it was. '30' isn't a valid time. '0030', of course, is. The problem is fixed in 8.5 but the fix will not be backported. (The current build system in 8.4 does not successfully run 'make gendate', and the 8.5 'gendate' cannot be backported compatibly.)
Log in (anonymous is fine) to add a comment.