Disclaimer:
The purpose of this post is to track my journey into Common Lisp. Though there might exist more optimal ways, this represents my pers...
For further actions, you may consider blocking this person and/or reporting abuse
The function
encode-universal-timedoesn't give me the same results as you. Your results (shown in the comments):My results (with SBCL 2.4.0):
And, I get yet a third result when I use an online lisp compiler:
I'm not sure why, but changing the year from 23 to 2023 produces the same results:
There's nothing in the hyperspec about that. How does
encode-universal-timeknow that 23 means 2023 and not 1923? Edit: The hyperspec says:Edit: I think the different results have to do with timezones. According to the hyperspec for
encode-universal-time:That implies that there is some adjustment if you don't supply a timezone? I tried suppling a timezone of 0, which I think is GMT:
With a timezone of 0, I got the same numbers using the online lisp interpreter.
Oh, on reddit we have the idea:
Thanks @vindarel !, should that simplify my
parse-datefunction? something like:Well done. To add a handy library in: