Posted to trash by kostix at Sat Jun 16 23:20:23 GMT 2007view raw

  1. 1. testcase:
  2.  
  3. 1.1 code:
  4.  
  5. set ptime [palmtime from $sometime]
  6. puts [format 0x%08x $ptime]
  7. puts [clock format $ptime]
  8.  
  9. 1.2 output:
  10.  
  11. C:\src\tclplkr>tclkitsh85 clock.tcl
  12. 0x44f5c9ee
  13. Wed Aug 30 21:25:02 +0400 2006
  14.  
  15. 2. actual project:
  16.  
  17. 2.1 code:
  18. puts [format 0x%08x $header(creationDate)]
  19. set header(creationDate) [clock format $header(creationDate)]
  20.  
  21. 2.2 output:
  22.  
  23. C:\src\tclplkr>tclkitsh85 unpluck.tcl modsecman.pdb
  24. 0x44f5c9ee
  25. number too large to represent as a Posix time
  26. while executing
  27. "GetDateFields $clockval $TZData($timezone) 2299161"
  28. (procedure "::tcl::clock::formatproc'%a %b %d %H:%M:%S %Z %Y'C" line 4)
  29. invoked from within
  30. "$formatter $clockval $timezone"
  31. (procedure "::tcl::clock::format" line 74)
  32. invoked from within
  33. "clock format $header(creationDate)"
  34. invoked from within
  35. "set foo [clock format $header(creationDate)]"
  36. (file "unpluck.tcl" line 251)
  37.  
  38. As you can see, the actual value passed to [clock format] appears to be the same integer.

Comments

Posted by dgp at Sun Jun 17 02:45:57 GMT 2007 [text] [code]

"number too large to represent as a Posix time" does not appear to be a message generated by the Tcl HEAD. What release of Tcl 8.5 are you seeing it with? Can you reproduce with the current sources?