How can make valid date with SOAPpy?

91 views Asked by At

I have the folloving SOAP code, and from server I become as answer: invalid endDate

Here is my code:

from SOAPpy import WSDL2 as WSDL
from SOAPpy import Types
from lxml import etree

url = 'http://www.mnb.hu/arfolyamok.asmx?wsdl'
namespace = 'http://www.mnb.hu'
inp = Types.dateType(name=(namespace, '2015,04,15'))
out = Types.dateType(name=(namespace, '2015,04,17'))

server = WSDL.Proxy(url, namespace=namespace)
server.soapproxy.config.debug = 1

server.GetExchangeRates(startDate=inp,endDate=out,currencyNames='RUB,CNY')

On debug I see: 2015-04-17Z, why is Z on end the date?

1

There are 1 answers

1
tophyr On

The Z in 2015-04-17Z specifies the timezone - 'Z' is shorthand for Zulu Time, or UTC.

See http://www.w3schools.com/schema/schema_dtypes_date.asp for more detail about SOAP date/time formats.