Jump to content

Featured Replies

Posted

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.

That should be a valid format. 🤔

 

Maybe try only with the date to see if that works first?

2024-08-18
  • Author
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. 

  • 3 weeks later...

Could you share the full request that you're sending to the community, so that I can take a look at this?

  • Author

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 by virap1

  • 2 months later...
  • Author

Any updates on this? It has been 2 months.

  • 1 month later...
  • Author

@Daniel F can you please take a look into the code I posted? Thanks.

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.

CleanShot 2025-01-04 at 15.52.04.png

  • Author

Thank you for checking. Will you follow up on a fix or I should complete a bug report?

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.

  • 1 month later...
  • Author

@Daniel F This bug appears to also be in v5. When do you think this can be addressed? Thanks.

Its still an open bug report currently. We are unable to give time estimates on bug reports unfortunately

Recently Browsing 0

  • No registered users viewing this page.