views:

64

answers:

3

Hi

I have some strange behavior with ruby.

In a rake file I pass in a date to soap method. In the response it appends a Z at the end of the date.

in a lib file, same thing, same requirements, it doesn't.

I need the case where it doesn't. It executes the same.

What could it be?

      <n1:startDate>2009-08-18T00:00:00-05:00Z</n1:startDate>
      <n1:endDate>2009-08-26T00:00:00-05:00Z</n1:endDate>
+2  A: 

The letter at the end is an indicator of the timezone (in this case UTC). The timestamp is in ISO8601 format (pretty much the standard now-a-days for all things internet), so I'm not sure why you'd want otherwise.

Without seeing the code that's generating it I'm not sure what more I can offer. Why do you want it without the 'Z'?

fiXedd
A: 

You've got an ISO 8601 formatted date there, the Z indicates 'Zulu' time or UTC, but not sure why you're getting differing formats though.

Paul Dixon
A: 

Hi,

I am accessing an API which doesn t support this ISO standard. The date should not have a Z at the end. but when the soap response is build, it adds it. And I don t send it with that Z .. as I pass it to the web method.

Here is the code

 factory = SOAP::WSDLDriverFactory.new(WSDL_STATS)
  driver = factory.create_rpc_driver
  driver.wiredump_dev = STDOUT

  response = driver.getAllLeads({"pubID" => AFF_ID_TEST, "startDate" => start_date, "endDate" => end_date})

The end date that are passed, tried various .. isn t with that Z , from zone, at the end.

If I overwritte the zone method, maybe it will work, but I don t want to do that.

<n1:startDate>2009-08-18T00:00:00-05:00Z</n1:startDate>
  <n1:endDate>2009-08-26T00:00:00-05:00Z</n1:endDate>

I pass the date without the Z, but when the soap is constructed the Z is added somehow.

This is what I want

<n1:startDate>2009-08-18T00:00:00-05:00</n1:startDate>
  <n1:endDate>2009-08-26T00:00:00-05:00</n1:endDate>

Thank you ;)