Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

IntuitRequestException: cvc-datatype-valid.1.2.1 #124

Open
patrickreiner opened this issue Dec 12, 2013 · 1 comment
Open

IntuitRequestException: cvc-datatype-valid.1.2.1 #124

patrickreiner opened this issue Dec 12, 2013 · 1 comment

Comments

@patrickreiner
Copy link

The %Z in Quickeebooks::Shared::Service::Filter::DATE_TIME_FORMAT seems to be causing the following error:

IntuitRequestException: cvc-datatype-valid.1.2.1: '2013-09-04T16:52:30UTC' is not a valid value for 'dateTime'.

When I set the constant to '%Y-%m-%dT%H:%M:%S' it works fine. This is how I build my filters:

  filters.push Quickeebooks::Windows::Service::Filter.new(:datetime, field: 'StartModifiedTMS', value: Time.mktime(2013, 1, 1))
  filters.push Quickeebooks::Windows::Service::Filter.new(:datetime, field: 'EndModifiedTMS', value: Time.mktime(2025, 1, 1))
@ruckus
Copy link
Owner

ruckus commented Dec 13, 2013

This has been an on-going issue and I always forget the overall resolution.

If you look in this issue: #87

and this one: #86

it seems like it boils down to how the Filter is created, either with Time.mktime or using a DateTime (maybe an ActiveSupport sub-class if in a Rails environment).

In #86 it looks like he is using Time.mktime as well - but its not working for you(?)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants