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

Attachment: signature.asc
Description: PGP signature

Reply via email to