Time (zone) issue after restore from backup

For some reason, after performing a restore of a Matrix install from a backup (using the matrix backup script), the calendar items I have on my system are not coming out right and the time seems to be incorrect. The time shows up incorrectly in:
[list=1]


  • System log, Error log, under Log management in the Backend.
    [*]When creating a new single and recurring calendar event, the default time is several hours behind.
    [*]The keyword replacement (used on my front page) to show the current date is showing the time several hours out
        %globals_date_l%, %globals_date_j%%globals_date_S% of %globals_date_F%

    [*]The calendar shows the correct start time of events when using the Month view, and the event Label Format of
        %event_start_time_24h% %asset_metadata_BookingTitle% %asset_metadata_BookingReferenceNumber%. 

    [*]The upcoming event list (event horizon of 1 day) shows tomorrows events.


    I have a local machine where I have root access, no issues there. The issue that I have is with a hosted box. The hosting provider is also a bit confused about this issue.

    Things checked sofar:
    OS time: Correctly in sync using NTP
    OS timezone: Australia/Sydney
    php.ini time zone: Australia/Sydney
    main.inc timezone; Australia/Sydney
        grep -R timezone *
        core/include/init.inc:// This sets the default timezone so date functions don't throw E_STRICT.
        core/include/init.inc:date_default_timezone_set(SQ_CONF_TIMEZONE);


    I was sure that the main.inc config setting was the perp, but no luck there.

    So how far is the time out by? it is out by 16 hours. It looks like the timezone that the Matrix system thing it lives, is America/New York. So at 19:42 on 10 nov 2011 the "create new recurring calendar event | details page" shows 03:41 in the morning on 10 nov 2011.

    other possibilities?


      [*]Postgres has timezone perhaps?
      [*]During the restore the different timezone has mangled all the dates of my events. Not sure, but creating a new event, after the restore, still doesn't work. (I am happy to reenter all the events (100 odd) if that would make it work.
      [/list]

      I am completely stumped. Anyone? Anyone?
  • [quote]
    For some reason, after performing a restore of a Matrix install from a backup (using the matrix backup script), the calendar items I have on my system are not coming out right and the time seems to be incorrect.



    • Postgres has timezone perhaps?
      [*]During the restore the different timezone has mangled all the dates of my events. Not sure, but creating a new event, after the restore, still doesn't work. (I am happy to reenter all the events (100 odd) if that would make it work.


    I am completely stumped. Anyone? Anyone?
    [/quote]

    I'd say it all comes down to the database. Do the logs in data/private/logs/ show the right time?

    If you log in to psql (postgres command line), something like:

        
        $ psql -U matrix matrix
    


    and then

        
        matrix=> select now();
                  now              
        -------------------------------
         2011-11-16 09:23:36.078779+11
        (1 row)
    


    If that's the right time, then I'm not sure what to check next.

    If it's the wrong time you can set it to server time quite easily:

        
        matrix=> alter database matrix set timezone to default;
        ALTER DATABASE
    


    and then select now() again and see what it shows.

    It was an issue with the /usr/share/zoneinfo file on this particular box… :blink: Don't know exactly what the issue with the file was though.