Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt November 11, 2024
virap1 Posted August 19, 2024 Posted August 19, 2024 Hello. The api documentation says that for creating a database record we can pass the date as datetime. When I try to pass the date formatted like this 2024-08-18T19:19:06Z it does not seem to work and the record shows the current date. Every other field, aspect of rest api works fine. Am I doing something wrong? Thanks. bernhara 1
teraßyte Posted August 19, 2024 Posted August 19, 2024 That should be a valid format. 🤔 Maybe try only with the date to see if that works first? 2024-08-18 virap1 1
virap1 Posted August 22, 2024 Author Posted August 22, 2024 On 8/19/2024 at 8:08 AM, teraßyte said: That should be a valid format. 🤔 Maybe try only with the date to see if that works first? 2024-08-18 Thank you. This would not be an ideal solution for me, but even this did not work. Does anyone else have this issue? Any solutions.
Daniel F Posted September 6, 2024 Posted September 6, 2024 Could you share the full request that you're sending to the community, so that I can take a look at this?
virap1 Posted September 7, 2024 Author Posted September 7, 2024 (edited) Thank you @Daniel F. That part of the code looks like this: $date_tmp = new DateTime(); $date_tmp->modify('-24 hours'); //$formattedDate = $date_tmp->format('Y-m-d\TH:i:s\Z'); $formattedDate = $date_tmp->format('Y-m-d'); $data2 = array( "status" => "published", "category" => $cat_id, "author" => $author, "fields" => $fields2, "image" => $zzz_image, "date" => $formattedDate, "hidden" => 1, ); $curl2 = curl_init( $communityUrl . 'cms/records/7' ); You will notice there are 2 formattedDate variations, one is commented out. Neither one worked for me. Edited September 7, 2024 by virap1
virap1 Posted November 13, 2024 Author Posted November 13, 2024 Any updates on this? It has been 2 months.
virap1 Posted Saturday at 12:48 PM Author Posted Saturday at 12:48 PM @Daniel F can you please take a look into the code I posted? Thanks.
Daniel F Posted Saturday at 02:53 PM Posted Saturday at 02:53 PM it's setting the correct date (date is set to today -24h) but yeah, I have noticed that the record_publish_date column contains the current timestamp which is a bug.
virap1 Posted Saturday at 05:55 PM Author Posted Saturday at 05:55 PM Thank you for checking. Will you follow up on a fix or I should complete a bug report?
Daniel F Posted yesterday at 12:39 PM Posted yesterday at 12:39 PM 18 hours ago, virap1 said: Thank you for checking. Will you follow up on a fix or I should complete a bug report? No need for a new bug report, I already reported it to our internal bugtracker yesterday. virap1 1
Recommended Posts