Use runtime system's built-in support for ISO C ctime() strings.
authorChris Hanson <org/chris-hanson/cph>
Mon, 15 May 2000 17:51:25 +0000 (17:51 +0000)
committerChris Hanson <org/chris-hanson/cph>
Mon, 15 May 2000 17:51:25 +0000 (17:51 +0000)
v7/src/imail/imail-umail.scm

index d1abc5f0e65968ab2b58d866f42c93dd81270c54..07a5c9be047d020f4b6becfe18fed05027d68574 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: imail-umail.scm,v 1.19 2000/05/12 18:23:03 cph Exp $
+;;; $Id: imail-umail.scm,v 1.20 2000/05/15 17:51:25 cph Exp $
 ;;;
 ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology
 ;;;
                            "unknown")
                        port)
          (write-string " " port)
-         (write-string (universal-time->unix-ctime (get-universal-time))
-                       port))))
+         (write-string
+          (universal-time->local-ctime-string (get-universal-time))
+          port))))
   (newline port)
   (write-header-field
    (message-flags->header-field (message-flags message))
              (write-string line port)
              (newline port))
            (string->lines (message-body message))))
-
-(define (universal-time->unix-ctime time)
-  (decoded-time->unix-ctime (universal-time->local-decoded-time time)))
-
-(define (decoded-time->unix-ctime dt)
-  (string-append
-   (day-of-week/short-string (decoded-time/day-of-week dt))
-   " "
-   (month/short-string (decoded-time/month dt))
-   " "
-   (string-pad-left (number->string (decoded-time/day dt)) 2)
-   " "
-   (string-pad-left (number->string (decoded-time/hour dt)) 2 #\0)
-   ":"
-   (string-pad-left (number->string (decoded-time/minute dt)) 2 #\0)
-   ":"
-   (string-pad-left (number->string (decoded-time/second dt)) 2 #\0)
-   " "
-   (number->string (decoded-time/year dt))))
 \f
 ;;;; Detection of unix "from" lines.