Sending dates in URL to the server swaps months and days
wolfen351 opened this issue · comments
Hi there
If I send a DateTime object to the server representing 12 Jan 2015, the server interprets it as 1 Dec 2015. This happens if the server method accepts the datetime object directly.
I have noticed that the WebAPIProxy generates the url by just "xxxxx&myDate="+ myDate + "&xxxx"
Please can we change this, so the date is written in a way that C# MVC understands, but is unambigious.
Like ISO 8601 for example?
I have done a little research and I think this might work
myDateParameter.UtcNow.ToString("o")
I am not finding time for this project. @wolfen351 do you want to be a co-admin?
Sure
Sent from my Samsung device
-------- Original message --------
From: Fanie Reynders notifications@github.com
Date: 14/01/2016 2:56 PM (GMT+04:00)
To: faniereynders/WebApiProxy WebApiProxy@noreply.github.com
Cc: wolfen351 github@wolfen.za.net
Subject: Re: [WebApiProxy] Sending dates in URL to the server swaps months and
days (#70)
I am not finding time for this project. @wolfen351 do you want to be a co-admin?
—
Reply to this email directly or view it on GitHub.
@wolfen351 you should be able to contribute now.
Ok I'll start cleaning up issues shortly
Ok, we have 2 problems:
- URL parameters need encoding
- DateTime should be sent in a standard format, as to not lose data on the wire
@wolfen351 hit me up on Twitter