guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: timestamp


From: adriano
Subject: Re: timestamp
Date: Sat, 12 Feb 2022 10:49:28 +0100

Il giorno sab, 12/02/2022 alle 10.01 +0100, tomas@tuxteam.de ha
scritto:
> 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

yes, this helps

Thank you, Tomas 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]