[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do you format date-times in RFC 3339 style?
From: |
Ricardo Wurmus |
Subject: |
Re: How do you format date-times in RFC 3339 style? |
Date: |
Tue, 12 Feb 2019 17:50:16 +0100 |
User-agent: |
mu4e 1.0; emacs 26.1 |
sirgazil <address@hidden> writes:
> El 11/02/19 a las 4:39 p. m., Nala Ginrut escribió:
>> Hi there!
>> Guile web module has provided an unexpected API for that:
>>
>> (define write-date (@@ (web http) write-date))
>
>
> I think I prefer using public procedures, so I'll leave the error
> there for now.
I suppose you could hack your way around this:
(use-modules (srfi srfi-19))
(let* ((now (current-date))
(tz (date->string now "~z")))
(string-append (date->string now "~Y-~m-~dT~H:~M.~S")
(string-drop-right tz 2) ":" (string-take-right tz 2)))
What do you think?
--
Ricardo