Skip to content

Timezone is lost for xsd:date value #769

Open
@wbkoetsier

Description

@wbkoetsier

Zeep 2.5.0
Python 3.6.0
WSDL: http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl

Running

client = Client(wsdl=self.BASE_URL)
response = client.service.checkVat(countryCode='NL', vatNumber='TESTVATNUMBER')

gives me a value of datetime.date(2018, 6, 6) for requestDate. I was a bit suspicious because the time zone is missing here, so I checked the 'raw' XML output:

client = Client(wsdl=self.BASE_URL)
with client.options(raw_response=True):
    response = client.service.checkVat(countryCode='NL', vatNumber='TESTVATNUMBER')

which gives me <requestDate>2018-06-06+02:00</requestDate> (I was expecting a time here too, but the wsdl clearly states that requestDate is in xsd:date format, so no time), so the time zone is actually provided by the service.

What could be the problem here? Any help would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions