Arc Forumnew | comments | leaders | submitlogin
6 points by CatDancer 5713 days ago | link | parent

date only works if you have the right operating system:

  arc> (date)
  date: 1241536295: No such file or directory
  Error: "make-string: expects argument of type <non-negative exact integer>; given -1"
a patch is available at http://catdancer.github.com/date.html


2 points by pg 5698 days ago | link

We now get the date from Mzscheme so this should be fixed. Here's the new Scheme code:

    (putenv "TZ" ":GMT")

    (define (gmt-date sec) (seconds->date sec))

    (xdef timedate
      (lambda args
        (let ((d (gmt-date (if (pair? args) (car args) (current-seconds)))))
          (ac-niltree (list (date-second d)
                            (date-minute d)
                            (date-hour d)
                            (date-day d)
                            (date-month d)
                            (date-year d))))))

-----