Results 1 to 40 of 160

Thread: VB6 - JsonBag, Another JSON Parser/Generator

Threaded View

  1. #11

    Thread Starter
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: VB6 - JsonBag, Another JSON Parser/Generator

    Thanks for the early feedback!

    Yes, there were glitches so here is JsonDate 1.1 with these changes:


    IsoToDate()'s AssumeZ handling was exactly backwards! Desired and corrected behavior:

    Code:
    Given that the local time zone is -5, and the ISO input is:
    
        2015-04-20T15:51:38
    
    UtcMode = False and AssumeZ = False mean ISO value with no
    time zone should give a local time same as the ISO local time:
    
        2015-04-20 15:51:38
    
    UtcMode = True and AssumeZ = False mean ISO value with no time
    zone should give a UTC time converted from the ISO local time:
    
        2015-04-20 20:51:38
    
    UtcMode = False and AssumeZ = True mean ISO value with no time
    zone should give a local time converted from ISO UTC time:
    
        2015-04-20 10:51:38
    
    UtcMode = True and AssumeZ = True mean ISO value with no time
    zone should give a UTC time same as the ISO UTC time:
    
        2015-04-20 15:51:38

    ISO date/time values are allowed to use 24:00 or 24:00:00 as midnight the next day. IsoToDate() handles this now.


    IsoToDate()'s signed time zone offset handling was exactly backwards!


    These kinds of bugs show how hard it is to develop correct software on your own. Even with test cases that cover most of the edge cases you can still miss some. And even then one set of eyeballs is never enough. This is part of the argument for open source software.

    These bugs were embarassing because two of them were nothing but "dumb mistakes." The important thing is finding the errors and fixing them, and for that I thank those who PMed me with feedback.
    Attached Files Attached Files
    Last edited by dilettante; Apr 23rd, 2015 at 10:02 AM.

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width