Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QuickBooks Web Connector TimeModified offset does not account for Daylight Savings time

I'm using QuickBooks Web Connector to pull employee records out of QuickBooks Desktop on a Windows 8.1 machine using QBXML requests. Is there a reason the TimeModified time stamps are returning an offset that does not account for Daylight Savings time? Is there a way to get the current time on the host system?

It is currently returning "2014-03-27T14:20:53-05:00" for TimeModified, even though the current timezone is set to Eastern Time with "Adjust for Daylight Savings Time" enabled. The offset should be -04:00.

The QBXML request:

<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="12.0"?>
<QBXML>
  <QBXMLMsgsRq onError="stopOnError">
    <EmployeeQueryRq metaData="MetaDataAndResponseData">
      <OwnerID>0</OwnerID>
    </EmployeeQueryRq>
  </QBXMLMsgsRq>
</QBXML>
like image 571
antibrian Avatar asked Mar 27 '14 18:03

antibrian


2 Answers

According to a moderator of the IPP community, this is a bug. Unfortunately we have no way of tracking it.

"QBWG-18389 - DST is not showing correctly in TimeCreated & TimeModified Fields ... We do not have a way to track these externally."

Incorrect TimeModified Offset - Intuit Partner Platform Community (Edit: Aaaaand it's gone. This is now a dead link, perhaps the issue can be tracked down?)

like image 187
antibrian Avatar answered Sep 23 '22 04:09

antibrian


I have made a c# library to handle this scenario. It's open source.

https://github.com/jsgoupil/quickbooks-sync

After working a long time fixing this bug, we came up with this solution

QuickBooks does not handle Daylight Saving Time (DST) properly. The DATETIMETYPE class in this library is aware of this issue and will correct timestamps coming from QuickBooks by removing the offset values in the common use cases.

Internally, QuickBooks returns an incorrect date time offset during DST. Consequently, QuickBooks expects that you send the date time with the same incorrect offset OR a date time, without an offset, in the computer's time zone where QuickBooks is installed.

like image 38
jsgoupil Avatar answered Sep 19 '22 04:09

jsgoupil