Support » Plugin: The Events Calendar » tribe_create_event => problem with the date

  • Resolved MyRestlessDream


    Hi !

    First at all, thank you a lot for your plug-in. It’s a very great one and it saves me a lot of time 😀
    But I got an issue. I cant figure out how to create a new event with the date that I want. It’s always the 1st January 1970…

    In your doc, you do not give an example of the date format:

    I tried a lot of possibilities but nothing works. I searched everywhere but I did not find the solution. Is it the date format “Y-m-d H:i:s” ? I tried ‘EventStartDate’=>’2012-03-21’ ; ‘EventStartDate’ =>’2012-03-21 01:15:00′ ; ‘EventStartDate’=>’2012/03/21’; but nothing works… I am getting crazy 🙁

    What do I have to do to get it working ?

    Thank you in advance ! (I hope I did nothing wrong by posting my question here)

Viewing 4 replies - 1 through 4 (of 4 total)
  • I found the solution by myself! I am French so it was not the good format. I did not know that the plugin translates automatically the date. So it needs the French format !
    In case that someone has the same problem, I used the format ‘dd-mm-yyyy’. And it is mandatory to fill the EventStartHour and EventStartMinute! (in French format so without the meridian 17:00). The date will not work without those parameters!

    Here an example :

    $insert = array(
       'post_title' => 'Titre',
       'post_content' => 'Description',
       'post_status' => 'draft',
       'post_author' => 999,
       'post_excerpt' => 'Extrait',
       'EventStartDate' => '30-01-2013',
       'EventEndDate' => '31-01-2013',
       'EventStartHour' => '08',
       'EventStartMinute' => '15',
       'EventEndHour' => '17',
       'EventEndMinute' => '30',
       'EventCost'=> '10',
       'EventShowMap'=> true,
       'Venue' => array(
    		'Venue' => 'Nom de la salle',
    		'Country' => 'France',
    		'Address' => 'Adresse',
    		'City' => 'Ville',
    		'Zip' => '00000'
       'Organizer' => array(
    	'Organizer' => 'Nom',
    	'Email' => '',
    	'Phone' => '0600000000'
    tribe_create_event( $insert );

    Plugin Author Rob La Gatta


    Fantastic to hear you got this sorted yourself, MyRestlessDream! Sorry on our part for not checking in and seeing this to help you out when you first posted it, but glad that you had the abilities to make it happen.

    Thanks, too, for posting your solution. This will certainly be of value to others down the road who find themselves in your same position and we really appreciate you taking the time to come back and share it.

    If you ever want to go PRO, let me know (rob a/ and I’ll happily hook you up with a discount coupon 🙂 Our way of saying thanks for going the extra mile here. Cheers.

    Thank you for your answer 🙂

    No problem for posting my solution. It is really disappointing when we cant find the solution because the person doesn’t share it! It can always help someone so I always share my solutions 😉

    Thank you a lot for the discount coupon. I will tell to my customer about the PRO version 🙂


    Thanks for the followup MyRestlessDream, let us know if you need anything else!

    – Jonah

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘tribe_create_event => problem with the date’ is closed to new replies.