> From: Ricardo Wurmus <rek...@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.