Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 811ae60f94d4b13e5dc3531b23f960b137e7a12f
Ticket: b32fffae8156a93d7c083122fdb7e22a10ecf4aa
clock scan returns wrong date if dayOfMonth is missing
User & Date: heinzbr on 2015-05-05 09:25:52
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    Hello, 
    when using 'clock scan' to get the date of a string containing "month" and
    "yearOfCentury" today's date is returned instead of assuming "1" for the "dayOfMonth"
    and returning the given date.
    
    I think this can be fixed in the DateParseActions table in clock.tcl.
    
    The following two examples show the problem:
    
    set d1 [clock scan "Apr12" -format "%b%y"]
    puts [clock format $d1 -format "%d %B %Y"]
    #--> result in today's date
    
    set d2 [clock scan "17Apr12" -format "%d%b%y"]
    puts [clock format $d2 -format "%d %B %Y"]
    #--> 17 April 2012
    
  5. foundin changed to: "8.6.4"
  6. is_private changed to: "0"
  7. login: "heinzbr"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "d209212fd9d779f06989a171f1fc974b6dd4274c"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "heinzbr"
  14. subsystem changed to: "16. Commands A-H"
  15. title changed to:
    clock scan returns wrong date if dayOfMonth is missing
    
  16. type changed to: "Bug"