I am producing a google calendar query string that requires an atom fomatted date.
I am using php 5.1.6, and date(DATE_ATOM) to produce the correctly formatted current date. So, for instance, in the unencoded url part of the query has:
start-max=2010-09-02T10:25:58+01:00
I need to rawurlencode this and it becomes
start-max%3D2010-09-02T11%253A37%253A59%252B01%253A00
Now if I rawurldecode this it becomes
start-max=2010-09-02T11%3A39%3A35%2B01%3A00
So it hasn’t decoded properly and google rejects the query…
If I rawurldecode the query twice the date is decoded but the original ‘+’ is replaced with a space ( even though it is still encoded in the above string)
The same is true for urlencode/urldecode 🙁
Any ideas how to encode / decode the URL with this date format in it?
Cheers
Cannot reproduce:
So, probably you’re rawurlencode’ing the value, and then the whole string:
…which could be desired behavior if you’re sending a complete url in an get variable, but more probably you have a logical error somewhere.