Time zone conversion (sometimes)



  • We deal with a software vendor whom we'll just call XYZ for now because they get pissy when you point out flaws in their system. They're virtually a monopoly in our industry so we're forced to use their software.

    Anyway, they have a desktop suite of software that we use, as do many of our clients. They also provide some libraries to build web applications to use or modify the same data that Desktop works with. I maintain our product, which is a Silverlight application built on that library. It allows a subset of the functionality of the full desktop program, but mainly allows searching, editing, reporting, and some other stuff.

    I was trying to figure out why modifying a DateTime field worked okay unless I modified the time part. Everything indicated it worked fine. I could edit the time through the web and save, and my local copy updates to display the new time and the web service (built by XYZ, I have no control over it) indicates that the save was successful. Yet whenever I re-query and examine the object I just modified, the time was nowhere near the time I entered and was told saved correctly. Sometimes even the date would be wrong and would end up on tomorrow's date.

    Eventually I noticed the time after I save was always exactly six hours later than the time I entered. My timezone is GMT-6.

    After some further investigation (based on behavior alone, I could find no documentation of what I've encountered) we realized that when you save over the web API, it converts the DateTime object to UTC before saving. But that's the only conversion. It does not convert to local time when you retrieve that DateTime. And Desktop seems to do no timezone conversion at all.

    It's kinda like having a database engine that sometimes multiplies doubles by 10 before storing them. Which would be fine if it divided by 10 before giving it back to you (but only if the multiply was done in the first place), except it doesn't. And since the vendor is a monopoly they ignore just about everyone on feature requests and bug reports.



  • Is there any way you can massage the data recieved from the service call?  Just make it configurable, and when they decide to get off their fat arses and actually fix it, just disable it.

    I know it puts the work on your plate, but as you said, there isn't much else you can do, right?



  • @C-Octothorpe said:

    there isn't much else you can do, right?

    SHAME THEM! TELL US THE VENDOR!



  • @Xyro said:

    SHAME THEM! TELL US THE VENDOR!
    I guess at least we know they're on GMT. They're probably on the UK. Or Ghana.



  • @Zecc said:

    I guess at least we know they're on GMT. They're probably on the UK.
    Only if it's UTC since Sunday 30th Oct, and was UTC+1 before then.



  • I have a guess: a French company that produces very expensive CAD software and now forces thier CAD clients to buy a web-based collaboration solution or your expensive desktop software won't run.



  • @Ex-Navy Dude said:

    I have a guess: a French company that produces very expensive CAD software and now forces thier CAD clients to buy a web-based collaboration solution or your expensive desktop software won't run.

    Ugh, I think I know who you mean ... horrible, bug ridden ...


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.