I have a Date (Unix timestamp) field on my content type that
with a NODE GET is returned like this:
"field_starting_date" = {
und = (
{
"date_type" = datestamp;
timezone = UTC;
"timezone_db" = UTC;
value = 1352734200;
value2 = 1352734800;
}
);
};
Up until yesterday I was able to create nodes of this content type and set the date with the following format:
"field_starting_date" = {
und = (
{
value = 1352732238;
value2 = 1352739438;
}
);
};
But at some point this stopped working and now all I get is
Expected status code in (200-299), got 406, ["A valid date is required for Start Date Start date."]
What format is this supposed to take? I've tried every combination I can think of and can't seem to get anywhere, so any help is appreciated. I don't know exactly when it stopped working but I suspect it might've been when I added a second Date (Unix timestamp) field to the content type which I have since removed.
Comments
Comment #1
stongo commentedI battled with this for a while, too
Use Firefox's add-on Tamper Data, I checked out the POST data when submitting a form with the date field I was trying to update with services.
To make a long story short, this is the JSON that worked for my date field:
My field was iso format (but as you can see it uses the same value as the actual Drupal edit form requires), but you should be able to use Tamper Data to see the exact requirements for your date field if this doesn't work.
Comment #2
marcingy commentedClosing as old support request