0

I am using webhooks and zapier to take information and post it into a firebase document, and it keeps giving me the error invalid timestamp.

Right now on PHP i am displaying a date as the following

02/24/2023 14:00 PM

i would need to some how use PHP to convert this into the correct firebase timestamp format.

I Am unsure of what format firebase database uses.

$old_date = $booking->format_start_date_and_time_rfc3339();
$old_date_timestamp = strtotime($old_date);
$new_date = date('m/d/Y  H:i A', $old_date_timestamp); 
$old_end_date = $booking->format_end_date_and_time_rfc3339();
$old__end_date_timestamp = strtotime($old_end_date);
$new_end_date = date('m/d/Y  H:i A', $old__end_date_timestamp); 
    
    
    
$vars = ['id' => $booking->id,
        'booking_code' => $booking->booking_code,
        'start_datetime' => $new_date, 
        'end_datetime' => $new_end_date,

0 Answers0