I am trying to pull in transaction data from NetSuite via the SuiteAnalytics connector. For whatever reason, DateTime values are stored in GMT/UTC (specifically a custom timestamp field) in NetSuite and the Date values (specifically the TRANDATE field) is stored in our local Pacific timezone.
When I preview the dataset returned from my query, it (erroneously?) tries to adjust ALL date columns for the different timezones. For example a transaction date 2017-07-31 00:00:00 will preview as 2017-07-30 05:00:00PM. It will also try to correct the timezones when use the dataset on a card. The problem here is that my date columns are for the date before, but my timestamp columns are accurate.
When I export the dataset or use it within an ETL (MySQL, Redshift) it doesn't make any adjustments for timezones.
Has anyone else worked out a best practice for how to handle these? I have come up with two "solutions" that are less than ideal:
- Correct the timezone for DateTimes in the SuiteAnalytics query, then pass all NetSuite datasets through an ETL before using them on cards. Anyone who mistakenly previews/uses the SuiteAnalytics dataset directly will see incorrect numbers.
- Add 7 hours to the Date columns in the SuiteAnalytics query, then anytime it's used in an ETL be sure to subtract 7 hours from all Date/DateTime columns.
I'm leaning more toward the second solution, but this is all so unintuitive I'm afraid it will be hard to maintain or changed in a bug fix.
Has anyone dealt with this or a similar problem?