[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: timestamp
From: |
Eli Zaretskii |
Subject: |
Re: timestamp |
Date: |
Sat, 12 Feb 2022 14:38:58 +0200 |
> From: Ricardo Wurmus <rekado@elephly.net>
> Date: Sat, 12 Feb 2022 12:49:10 +0100
> Cc: guile-user@gnu.org
>
>
> Hi adriano,
>
> I’ve got no good answers as to “why” things are the way they are, but
> the manual explains the range of these values:
>
> > It seesm to be
> >
> > (tm:mon %3)
> >
> > This returns
> >
> > 11
> >
> > I expected 12 but ok, I recognize this kind of weirdness
>
> -- Scheme Procedure: tm:mon tm
> -- Scheme Procedure: set-tm:mon tm val
> Month (0-11).
>
> > I'm unhappy with
> >
> > (tm:year $3)
> >
> > This returns
> >
> > 120
> >
> > it's 2020
> >
> > Why would 120 represent 2020 ?
>
> -- Scheme Procedure: tm:year tm
> -- Scheme Procedure: set-tm:year tm val
> Year (70-), the year minus 1900.
>
> I don’t know why this would be useful, but that’s what it is ¯\_(ツ)_/¯
It is simply how the C function 'localtime' returns its data,
basically for historical reasons. Guile hands it to the application
without any changes.
- timestamp, adriano, 2022/02/12
- Re: timestamp, Vivien, 2022/02/12
- Re: timestamp, adriano, 2022/02/12
- Re: timestamp, Ricardo Wurmus, 2022/02/12
- Re: timestamp, tomas, 2022/02/12
- Re: timestamp,
Eli Zaretskii <=
- Re: timestamp, adriano, 2022/02/12
- 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