Results 1 to 3 of 3

Thread: DT_DateTimeSubSeconds breaking in late December

  1. #1

    DT_DateTimeSubSeconds breaking in late December

    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.

    Dim date, time As String
    '---Load Console and DT Modules
    Uses "Console"
    Uses "dt"

    '--- These are the strings
    PrintL DT_DateTimeSubSeconds(date,time,1) '--- subtract a second

    '--- Advance the date
    PrintL DT_DateTimeSubSeconds(date,time,1) '--- whoopsie!
    PrintL DT_DateTimeAddSeconds(date,time,-1) '--- add (-1) second -- oof!


  2. #2
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Brno - Czech Republic
    Rep Power
    Oh noes,

    thanks for reporting this, this is a bug indeed!

    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

  3. #3
    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.

Similar Threads

  1. Declarations: Local early and late binding
    By Charles Pegge in forum O2h Compiler
    Replies: 0
    Last Post: 22-07-2009, 20:11
  2. Important decision ( done late )
    By Petr Schreiber in forum TBGL module by Petr Schreiber
    Replies: 6
    Last Post: 12-05-2008, 23:03

Members who have read this thread: 1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts