Skip to content
Tcl Source Code History Of Ticket 217968
Login

History Of Ticket 217968

Artifacts Associated With Ticket 217968

  1. Ticket change [85fc6b6784] (rid 131428) by nobody on 2000-10-26 00:46:55:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 4862 RFE
      Version: 8.3
      SubmitDate: '2000-04-05'
      LastModified: '2000-06-26'
      Severity: MED
      Status: Closed
      Submitter: techsupp
      ChangedBy: ericm
      RelatedBugIDs: 5297
      OS: Windows NT
      OSVersion: 4.0 sp5
      Machine: AMD K6-2/333 128MB RAM
      FixedDate: '2000-06-26'
      ClosedDate: '2000-10-25'
      
      
      Name:
      David Cuthbert
      
      CVS:
      05 April 2000 00:30 EDT
      
      Extensions:
      [incr Tcl] 3.1.0
      
      CustomShell:
      None
      
      Comments:
      The following Tcl script is being used as a workaround:
      
        proc ::Kanga::Article::ScanDate {date} {
           # Try to handle this in Tcl, if possible
            set cr [catch { set scan [clock scan $date] }]
      
            if {!$cr} { return $scan }
      
            # Hmm... ok, try to pick out any strings like "GMT+0100" or "+0100"
            set pluspos  [string last "+" $date]
            set minuspos [string last "-" $date]
      
            if {$pluspos > $minuspos} { 
        set pos $pluspos
            } else {
        set pos $minuspos 
            }
      
            if {$pos != -1} {
        # Ok, see if there are four digits following this
        set offset [string range $date [expr {$pos+1}] [expr {$pos+4}]]
        if {[string length $offset] == 4 &&
            [string is digit $offset] &&
            [string index $offset end] == "0"} {
            # Finally, see if there is "GMT" or "GMT " preceding this
            if {[string range $date [expr {$pos-3}]  [expr {$pos-1}]] == "GMT"} {
        set basedate [string range $date 0 [expr {$pos-4}]]
            } elseif {[string range $date [expr {$pos-4}]  [expr {$pos-1}]] == "GMT "} {
        set basedate [string range $date 0 [expr {$pos-5}]]
            } else {
        set basedate [string range $date 0 [expr {$pos-1}]]
            }
      
            set cr [catch {
        if {[string index $date $pos] == "-"} {
            set mult -1
        } else {
            set mult 1
         }
      
        set hr [string range $offset 0 1]
        set mn [string range $offset 2 3]
      
         # Avoid accidental octal conversion
          if {[string index $hr 0] == "0"} { 
              set hr [string index $hr end]
          }
      
          if {[string index $mn 0] == "0"} {
              set mn [string index $mn end]
          }
      
          set scan [expr {[clock scan $basedate -gmt 1] +
          $mult * $hr * 3600 +
          $mult * $mn * 60}]
              }]
      
            if {!$cr} {
        return $scan
            }
        }
            }
      
            # Nothing has worked.  Return an error
            error "cannot convert $date to a date/time."
        }
      
      DesiredBehavior:
      I would like [clock scan] to be able to handle: "Wed, 15 Mar 2000 16:50:23 +0100" (produced by some newsreaders)
      
      Workaround:
      
      
      
      
      
    4. foundin initialized to: "obsolete: 8.3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "48. Number Handling"
    10. title initialized to: "clock scan doesn't handle GMT+xxxx timezones"
    11. type initialized to: "Bug"
  2. Ticket change [9b76df7b6f] (rid 111130) by welch on 2000-10-26 08:10:57:

    1. closedate changed to: "2000-10-26T01:10:57"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [21c99160b0] (rid 130644) by dgp on 2001-04-05 06:56:34:

    1. closedate changed to: "2001-04-04T23:56:34"
    2. closer changed to: "dgp"
    3. subsystem changed to: "06. Time Measurement"