We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42511
    • 60 Posts
    And got the debug to work again. Strangely it looks as though the dates for the events are correct it's only the actual dates in the default calendar display that are going back to January 1970. Should I be setting some kind of start date maybe? (and it looks as though it was using the correct Timezone anyway).

    Notice: Undefined variable: properties in C:\xampp\htdocs\wacsites\core\cache\includes\elements\modsnippet\29.include.cache.php on line 109

    Notice: date_default_timezone_set(): Timezone ID '`Europe/London`</strong>' is invalid in C:\xampp\htdocs\wacsites\core\components\mxcalendars\model\mxcalendars\mxcalendars.class.php on line 215
    mxCalendar: TIMEZONE CHANGED: changed timezone for duration of this extra from Europe/London Europe/London [`Europe/London`]
    array(32) { ["theme"]=> string(7) "default" ["displayType"]=> string(8) "calendar" ["elStartDate"]=> string(3) "now" ["elEndDate"]=> string(8) "+4 weeks" ["eventListlimit"]=> string(1) "5" ["tplListItem"]=> string(11) "tplListItem" ["tplListHeading"]=> string(14) "tplListHeading" ["tplListWrap"]=> string(11) "tplListWrap" ["tplDetail"]=> string(9) "tplDetail" ["dateformat"]=> string(8) "%Y-%m-%d" ["timeformat"]=> string(8) "%H:%M %p" ["dateseperator"]=> string(13) "resultWrapTpl" ["activeMonthOnlyEvents"]=> bool(false) ["hightlightToday"]=> bool(true) ["todayClass"]=> string(5) "today" ["noEventClass"]=> string(14) "mxcDayNoEvents" ["hasEventsClass"]=> string(9) "mxcEvents" ["tplEvent"]=> string(8) "tplEvent" ["tplDay"]=> string(6) "tplDay" ["tplWeek"]=> string(7) "tplWeek" ["tplMonth"]=> string(8) "tplMonth" ["tplHeading"]=> string(10) "tplHeading" ["debug"]=> string(1) "1" ["showCategories"]=> bool(true) ["tplCategoryWrap"]=> string(15) "tplCategoryWrap" ["tplCategoryItem"]=> string(15) "tplCategoryItem" ["gmapAPIKey"]=> string(10) "gmapAPIkey" ["gmapRegion"]=> string(0) "" ["sort"]=> string(4) "name" ["dir"]=> string(4) "DESC" ["setTimezone"]=> string(24) "`Europe/London`" ["debugTimezone"]=> string(1) "1" }
    Notice: Undefined index: dt in C:\xampp\htdocs\wacsites\core\components\mxcalendars\model\mxcalendars\mxcalendars.class.php on line 392

    Notice: Undefined index: dt in C:\xampp\htdocs\wacsites\core\components\mxcalendars\model\mxcalendars\mxcalendars.class.php on line 392

    Notice: Undefined variable: debug in C:\xampp\htdocs\wacsites\core\components\mxcalendars\model\mxcalendars\mxcalendars.class.php on line 400


    Filtering calendar date SQL range with: 01/01/1970 through 02/12/1970

    SQL: SELECT mxCalendarEvents.* FROM `mod1_mxcalendars_events` AS `mxCalendarEvents` WHERE ( ( `mxCalendarEvents`.`repeating` = 0 AND `mxCalendarEvents`.`enddate` >= 0 AND `mxCalendarEvents`.`enddate` <= 3628800 OR ( `mxCalendarEvents`.`repeating` = 1 AND `mxCalendarEvents`.`repeatenddate` >= 0 ) ) AND `mxCalendarEvents`.`context` IN ('','web') AND `mxCalendarEvents`.`active` = 1 ) ORDER BY startdate ASC LIMIT 99

    mxCalendars Query started @0.039999961853027 and ended @0.049999952316284 for total processing time of 0.0099999904632568 seconds

    Returned Events: 1
    Repeating Event: A test
    ++(0) 2013-07-26 08:00 AM
    ++(1) 2013-08-26 08:00 AM
    ++(2) 2013-09-26 08:00 AM
    ++(3) 2013-10-26 08:00 AM
    ++(4) 2013-11-26 08:00 AM
    ++(5) 2013-12-26 08:00 AM
    mxc result set loop started @0.049999952316284 and ended @0.049999952316284 for total processing time of 0 seconds
    generate list of all columns for sorting started @0.049999952316284 and ended @0.049999952316284 for total processing time of 0 seconds
    Looping through events list of 6 total.
    arrEventDates started @0.049999952316284 and ended @0.049999952316284 for total processing time of 0 seconds

    Notice: Undefined index: dt in C:\xampp\htdocs\wacsites\core\components\mxcalendars\model\mxcalendars\mxcalendars.class.php on line 406

    Notice: Undefined index: cid in C:\xampp\htdocs\wacsites\core\components\mxcalendars\model\mxcalendars\mxcalendars.class.php on line 421

    Notice: Undefined index: cid in C:\xampp\htdocs\wacsites\core\components\mxcalendars\model\mxcalendars\mxcalendars.class.php on line 422

    Notice: Undefined index: cid in C:\xampp\htdocs\wacsites\core\components\mxcalendars\model\mxcalendars\mxcalendars.class.php on line 423
    UI Rendering started @0.049999952316284 and ended @0.24000000953674 for total processing time of 0.19000005722046 seconds

    Notice: Undefined index: cid in C:\xampp\htdocs\wacsites\core\cache\includes\elements\modsnippet\29.include.cache.php on line 398
    mxCalendar: TIMEZONE RESET: Europe/London

    mxCalendar processed in 0.30999994277954 seconds

    Today < > July 2013
    mxcalendars.label_dow_ mxcalendars.label_dow_ mxcalendars.label_dow_ mxcalendars.label_dow_ mxcalendars.label_dow_ mxcalendars.label_dow_ mxcalendars.label_dow_
    Jan 1

    2

    3
    • discuss.answer
      • 42511
      • 60 Posts
      Well,
      What I had written vanished when I previewed the post and pressed answered smiley.
      Sussed out that the problem is caused by Xampp/Php on Windows. The strftime("u",[i]timestamp[/i]) is not available in Windows(date("N",timestamp) seems to work), when the "u" is used it results in an undefined result and you end up with a date of 01/01/1970. Also strtotime() returns the timestamp for 01/01/1970 when used with xampp on windows - it's fine if you give it a date. (I guess the returned timestamp also means it doesn't get caught by the ISSET validation).
      Both work ok on Linux(and may work on windows in a different incarnation of Php and windows for all I know).
      Took me a while to sus it out as I spend most of my time tending dinosaurs(mainframe programming).
      Might be an idea to add a note to the documentation about xampp as I guess this will also apply to other calendar and date driven applications.(now tell me that most people are already aware of this smiley
      regards
      Allan