Solution for 1970 problem

Hi all,

There's a problem some people (including me) have: no matter what, all new events are shown with date 1-januari-1970.

At first I couldn't figure it out why, but now I think I've found a solution. The key to the problem is the date-string the Datetimepicker generates after selecting a date from the datetimepicker. This can be fixed fairly easy:

Adjust the file:

Search for dateFormat and adjust the string in which format your configuration works with.
I've altered mine to: dateFormat: "MM d, yy" and it seems to work.

Voila, now I'm able to add events into the calendar.


Good Luck everybody and enjoy this great plugin! Regards!

  • Just to note that the event calendar should work fine without this change if you are not using any other plugins that use a datepicker.

  • I also think that this change is likely to have other effects else where in the event calendar, so I don't recommend it.

  • I just saw that Curverider has added a datepicker view to core Elgg in SVN. This is very good news as it should end the nightmare of competing incompatible datepickers in different plugins.

    I'll be changing the event calendar to use the new core datepicker whenever it is available.

  • Hi,

    Strange enough I don't have any other datepicker-using plugins and still I got the strange 1970 occurance with everything else I tried. I'm running three ELGG sites and in every one of them I got the 1970 issue.

    Don't know wether it has something to do with Database colation or something serverconfigurationspecific. But after playing around with de DateFormat I actually managed to find the right format for my specific situation. Removing the fullday 'DD' (displaying Tuesday, Monday etc) from the string was my big solution.

    I'm guessing using Curverriders Datepicker will solve it globally.

    Anyway, this plugin really rocks, good luck on the process towards v1.0


  • Hi,

    I have the same problem and do not use another datepicker-plugin, too. But unfortunately, when I changed the file as Dangko suggested, the problem still remains.

    Does anyone else experienced the same?


  • What version of Elgg are you running?

  • It is in 1.6.1 as well as in 1.7

  • Hi n_l1

    Have you tried different strings for DateFormat? Maybe your configuration needs a different string buildup to recognize date-types such as "d-MM-yy" or "yy-MM-d".

    When you change this, the date-inputfield should match with the datebuildup which you've entered in de datepicker.php file.

    Important is that when you enter a new event is to look whether the day and the month don't get mixed up.

  • Hi,

    have a look at "1970 problem again"