Oh noes,
thanks for reporting this, this is a bug indeed!
Petr
Here's a fun one:
Watch what happens to the result when the day goes from December 29th to December 30th.
I also tried adding -1 second with a different result.
----8<-------------------------------------------------------
Dim date, time As String
'---Load Console and DT Modules
Uses "Console"
Uses "dt"
'--- These are the strings
date="12-29-2016"
time="15:38:44"
PrintL DT_DateTimeSubSeconds(date,time,1) '--- subtract a second
'--- Advance the date
date="12-30-2016"
PrintL DT_DateTimeSubSeconds(date,time,1) '--- whoopsie!
PrintL DT_DateTimeAddSeconds(date,time,-1) '--- add (-1) second -- oof!
WaitKey
------------------------------------------------------->8----
Oh noes,
thanks for reporting this, this is a bug indeed!
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
I was confounded by the differing results between the DT_DateTimeAddSeconds and DT_DateTimeSubSeconds functions. I assumed they would give identical results (right or wrong) as they do when the bug isn't in play.
Bookmarks