clock scan error

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf clock scan error

  • Creator
    Topic
  • #50932
    Rick Pritchett
    Participant

      proc add_one_minute {} {

         upvar xlateId       xlateId

       xlateInList   xlateInList

       xlateInTypes  xlateInTypes

       xlateInVals   xlateInVals

       xlateOutList  xlateOutList

       xlateOutTypes xlateOutTypes

       xlateOutVals  xlateOutVals

      lassign $xlateInVals time

      #set time $xlateInVals

      set time1 [string range $xlateInVals 0 7]

      set time2 [string range $xlateInVals 8 11]

      set format “%Y%m%d%H%M”

      echo $time

      set time [clock format [clock scan “+1 minute” -base [clock scan “$time1 $time2”]] -format $format]

      set xlateOutVals $time

      }

      > _oru_new.xlt /quovadx/qdx5.4/integrator/rad_prod/rad_err_0529              < MESSAGE 1 200905290046 Tcl callout error erroCode: NONE errorInfo: unable to convert date-time string “20090529 0046”    while executing “clock scan “$time1 $time2″”    (procedure “add_one_minute” line 10)    invoked from within “add_one_minute”

      any reason why it doesn’t like the hour between 0000 to 0059?

    Viewing 1 reply thread
    • Author
      Replies
      • #68061
        Tom Rioux
        Participant

          Rickey,

          It appears that the clock scan that is erroring out is expecting the date/time in the ISO 8601 point in time format.   Try changing the $time2 variable to include the seconds.   I tried appending a “00” to the end of it and it appeared to work.

          hcitcl>set time1 20090529

          20090529

          hcitcl>set time2 004600

          004600

          hcitcl>clock scan “$time1 $time2”

          1243575960

          Tom

        • #68062
          Rick Pritchett
          Participant

            i added the zeros like you did and it worked thanks!!!!!!!!!!!!

        Viewing 1 reply thread
        • The forum ‘Cloverleaf’ is closed to new topics and replies.