[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: timestamp
From: |
tomas |
Subject: |
Re: timestamp |
Date: |
Sat, 12 Feb 2022 10:01:25 +0100 |
On Sat, Feb 12, 2022 at 09:37:17AM +0100, adriano wrote:
> This
>
> scheme@(guile-user)> (stat:ctime (stat "cat.jpg"))
> $5 = 1607841890
>
> How do I get a timedate from that number ($5) ?
The traditional POSIX-ish functions are built in:
(localtime 1607841890)
=> #(50 44 7 13 11 120 0 347 0 -3600 "CET")
(strftime "%Y-%m-%d %H:%m:%s" (localtime 1607841890))
=> "2020-12-13 07:12:1607845490"
If you want to "go further", there is "SRFI-19 Time/Date conversions".
HTH
--
tomás
signature.asc
Description: PGP signature
- Re: timestamp, (continued)
- Re: timestamp, adriano, 2022/02/12
- Re: timestamp, Ricardo Wurmus, 2022/02/12
- Re: timestamp, adriano, 2022/02/12
- Guile cookbook ?, adriano, 2022/02/12
- Re: Guile cookbook ?, Ricardo Wurmus, 2022/02/12
- Re: Guile cookbook ?, adriano, 2022/02/12
- Re: Guile cookbook ?, Olivier Dion, 2022/02/12
- Re: Guile cookbook ?, Zelphir Kaltstahl, 2022/02/12
- Re: timestamp, Eli Zaretskii, 2022/02/12
- Re: Examples in Guile documentation, Zelphir Kaltstahl, 2022/02/12
Re: timestamp,
tomas <=