Arc Forumnew | comments | leaders | submitlogin
Arc date function error?
1 point by mattjones 6134 days ago | 2 comments
On my system (Ubuntu Linux), Arc's date function raises an error:

    arc> (date)
    date: 1202255642: No such file or directory
    Error: "make-string: expects argument of type <non-negative exact integer>; given -1"
The function is trying to pass a seconds value to the system's date command with the -r option:

    (def date ((o time (seconds)))
      (let val (tostring (system (string "date -u -r " time " \"+%Y-%m-%d\"")))
        (subseq val 0 (- (len val) 1))))
But on my Linux, -r takes a file name to print the last modified time for. Is this just a question of varying date commands?


2 points by brett 6134 days ago | link

http://arclanguage.org/item?id=155

-----

1 point by mattjones 6134 days ago | link

Thanks. I looked manually for a post on this issue but didn't find it. It's easy enough for me to just fix my copy of the function for now.

-----