Le 27/03/2022 à 16:28, Michael Gerdau a écrit :
Can you compile this test file and report back?

\version "2.23.7"

#(debug-enable 'backtrace)

#(display (current-time))
#(newline)

#(display (localtime (current-time)))
#(newline)

#(display (strftime "%d.%m.%Y" (localtime (current-time))))
#(newline)

Yields:
Starte lilypond.exe 2.23.7 [Ohne Titel]...
»C:/Users/mgd/AppData/Local/Temp/frescobaldi-o7oy9q4g/tmpbiiy5m9i/document.ly« wird verarbeitet
Analysieren...
C:/Users/mgd/AppData/Local/Temp/frescobaldi-o7oy9q4g/tmpbiiy5m9i/document.ly:8:2: Fehler: GUILE signalisierte einen Fehler für den hier beginnenden Ausdruck
#
 (display (localtime (current-time)))

Invalid argument
C:/Users/mgd/AppData/Local/Temp/frescobaldi-o7oy9q4g/tmpbiiy5m9i/document.ly:11:2: Fehler: GUILE signalisierte einen Fehler für den hier beginnenden Ausdruck
#
 (display (strftime "%d.%m.%Y" (localtime (current-time))))

Invalid argument
-499092417


Kompilation erfolgreich beendet
Erfolgreich abgeschlossen in 0.5".



Ugh, ugh, ugh.

\version "2.23.7"

#(display (strftime "%c" (localtime -499092417)))
#(newline)
#(display (strftime "%c" (localtime (+ -499092417 (expt 2 31)))))

=>

Tue Mar 9 12:13:03 1954

Sun Mar 27 16:27:11 2022


So this is an overflow error. At least on the MingW we use,
the size of long is apparently 32 bits, which does not suffice
for time purposes. Jonas, what do you think?

Jean


Reply via email to