1970 problem again

Hello implementation of event calendar raise error for year 1970 but when I display Object data but $event->start_date has not value. Have you any idea where can be a problem?

  • This is almost certainly caused by another plugin interfering with the event calendar date picker and has often been discussed in this group.

    Please read the other threads to find more information.

    In short, turn off other plugins using a date picker (Tasks plugin, Profile Manager, etc.)

  • Kevin I read all threds about this problem and disable profile manager solve this issue but my problem is that I need profile manager now

    Anthony

  • Please don't use this! Look at my new post

    Replace in "models/model.php" line 113 with

    $event->start_date = $ed->start_date;

    and line 115 with

    $event->end_date = $ed->end_date;

    Because $ed->start_date and $ed->end_date are already unix timestamps and strtotime($ed->start_date) returns an empty value.

    You needn't turn off plugins.

    I hope my English is not so bad, because I'm 12 years old and come from Germany.

    Jan

  • Hi Jan,

    If you are reporting a bug, I'm happy to patch the code.

    However, can you explain this in more detail?

    The event calendar works for me without this patch so I want to know what it does.

  • The function int strtotime ( string $time [, int $now ] ) expects to be given a string containing a US English date format and returns an Unix timestamp. But the input is already an Unix timestamp, so it returns an empty value. This is saved in the database. Then the timestamp is converted to a date, and the timestamp 0 is 1th Janurary 1970 0:00. For this reason I omit the strtotime function.

    I hope you can understand this.

    Jan

  • an224, can you confirm that making this change fixes your problem?

  • YYYYYEEEEEEEEEEEEESSSSSSSSSSSSSSSSSSSSSS!!!!!!!!!!!!!!!!!!!! it is workinggggggggggg!!!!! Spread the words to the woorllldddd!!!!

    So so great... thanks 2 both of you!

  • I agree Jan Kirsten modification solve problem with empty variable for start and endtime.

    Thank yuo so much for all work

  • Well then, I will definitely put this fix in the next release.

    I am curious though, why the event_calendar appears to work with no problem when it is not used with other plugins that use a date picker.

    Any insights?