Navigation

Pligg Support

Hello again everyone! Yet another problem has arised.
When i submit new content and i check the time it was posted (the thing that appears beside your name when you post, eg: 20mins ago), it doesn't show the correct time. For example if i post something 20 mins ago it appears 5 hours ago.
What seems to be the problem here?
Thank you in advance.

Possible Answers

    See Timezone offset in Settings > Miscellaneous

    | Posted 96 days ago | Permalink | Hide Replies

    Yes I've tried that but to no avail. It seems to be something else...

    Ah, i forgot to say that when i was installing it gave an error with the date.timezone setting. After some searching i changed the line in db.php:

    mysql_query ("SET time_zone = '".date("P")."'");

    to

    mysql_query ("SET time_zone = 'ini_get('date.timezone')'");

    and the install worked again

    Maybe this is the problem.. what do you say?

    | Posted 96 days ago | Permalink | Hide Replies

    That could be the problem. Is it always at 5 hours or is it a 5 hour difference? Meaning lets say you posted at noon, does it say 5 hours ago and stay there or does it change with the time. If you looked at 1 o'clock would it then say 6 hours ago?

    | Posted 96 days ago | Permalink | Hide Replies

    I think it's somewhat random (but not static hours) since there are stories that say 20 hours ago and its' comments are like a day ago. Not good at all.

    | Posted 96 days ago | Permalink | Hide Replies

    Have you tried changing that line in db.php back to the original and delete the template cache from the admin panel? What was the original error message you were getting and where did it appear?

    | Posted 96 days ago | Permalink | Hide Replies

    Yeah while i tried everything else i forgot to do the most obvious... That was exactly what worked. Thanks a lot for your help.

    PS: The error was when i was installing, in the step where the tables are created in the database, this appeared:

    date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead.

    But i guess it's not that big of a deal.

    | Posted 96 days ago | Permalink | Hide Replies

Who Upvoted this Story

Pligg.com's Support area is where you can ask questions and get answers. Just getting started with the Support area? This section describes tips for participating.

Submitting a Question or Comment

By taking a minute to research previous posts you may receive an answer much faster than waiting for a response to a new question. Begin by searching the support section for an answer. Sometimes you may even want to extend your search to the entire pligg.com domain.

If you are unable to find a relevant answer, submit a new question or comment here. Please provide a detailed description and, when necessary, debugging information such as your server environment (a link to a <?php phypinfo(); ?> .php page would be very helpful), your web browser, and any steps necessary to reproduce your issue.

Submitting an Answer

If you have an answer or useful response that you would like to add to a post, you can submit it as a comment which other users will then vote on. Answers are sorted by most popular to least, allowing the best information to climb to the top of the page.

Please read and vote for existing answers before submitting your own, as there may already be an acceptable answer provided. You can use the "Reply" link found within an answer to submit a response to it, in case you want to expand or comment on someone else's contribution.

Including Files or Code

Sometimes it is necessary for you to attach a file or include a snippet of code for others to reference in your response. In most cases, you can .zip up files and attach them to a question or answer using Pligg's file manager. At times though this may fail, and in these circumstances we recommend using a third party host. Below we are including a list of recommended websites where you can share easily share file uploads (or snippets of code) through the web.