links-lang / links

Links: Linking Theory to Practice for the Web
http://www.links-lang.org
Other
332 stars 42 forks source link

DateTime off-by-one error? #1119

Closed vcgalpin closed 2 years ago

vcgalpin commented 2 years ago

There is an off-by-one error in the month which seems to happen when serialising DateTIme. This screenshot of a webpage

DateTime

shows how the following two dates

links> hd(d0);
(ligand_id = 11827, ttf = 2022-01-05 13:28:57.047035+1) : (ligand_id:Int,ttf:DateTime)
links> hd(d1);
(ligand_id = 3559, ttf = 2021-12-16 14:14:04.709521+1) : (ligand_id:Int,ttf:DateTime)

get displayed (using show()). Using show() in the REPL gives the correct date.

links> show(hd(d0).ttf);
"2022-01-05 13:28:57.047035+1" : String
SimonJF commented 2 years ago

Hi Vashti, could you give me a standalone example to play with please? Thanks!