This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

incorrect time
#1

Hi!

I have recently started using commentics and have managed to work through several little problems but I am finding the time of the comments posted are incorrect. I have set the time zone to GMT+1/Budapest but I am getting some odd times.

Actually just checked, and this also happens with the pages. i just set up several pages and they are showing 3am, it is actually 10am.

I have looked but just cannot find where the problem might be except maybe in comments/general? but I am not sure what to change them to if indeed they are wrong.

A second question, is it not possible to back date comments? i want to transfer old comments to this new system but would like to keep the dates they were posted.


Any help much appreciated.
Reply
#2

1. What PHP/MySQL version are you using?

2. Where is your server located? Is it a Windows or Unix server?

3. If you do a preview, is the time correct?

4. Is it always 7 hours behind?

5. Which timezone is in Settings -> System?

Have you completed the interview?
Reply
#3

(10-Feb-2011, 10:48 AM)Steven Wrote:  1. What PHP/MySQL version are you using?
PHP = 3.3.8.1 / MySQL = 5.0.91
2. Where is your server located? Is it a Windows or Unix server?
Unix
3. If you do a preview, is the time correct?
yes!
4. Is it always 7 hours behind?
Just tried another post this time only 6 hours.
5. Which timezone is in Settings -> System?
europe/budapest

With ref. to Q1. I hope that is correct, many numbers and "versions" on the Cpanel!

Thanks.
Sorry, just to clarify. The preview post with the correct time reverts back 6 hours when actually posted and approved.
Reply
#4

I don't think you posted the correct PHP version because the installer requires at least PHP 5.2. You most likely posted your version of phpMyAdmin.

Anyway it looks like PHP has the correct time but not MySQL. This could be because your database server is in a different location to your web server.

In comments/includes/db/connect.php, try adding this on the line above the closing PHP tag:
PHP Code:
<?php 
mysql_query
("SET time_zone = '+1:00'");

Have you completed the interview?
Reply
#5

Perfect thanks very much!
Reply
#6

Glad that worked! Regarding your second question there will be an import feature in a future version but it probably won't be anytime soon so until then I suggest to add the comments as normal and then change the dates inside the comments table.

Have you completed the interview?
Reply
#7

Ok, thanks for your help.
Reply
#8

(10-Feb-2011, 11:40 AM)Steven Wrote:  I don't think you posted the correct PHP version because the installer requires at least PHP 5.2. You most likely posted your version of phpMyAdmin.

Anyway it looks like PHP has the correct time but not MySQL. This could be because your database server is in a different location to your web server.

In comments/includes/db/connect.php, try adding this on the line above the closing PHP tag:
PHP Code:
<?php 
mysql_query
("SET time_zone = '+1:00'");

Thanks, this is helpful for me, too
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Skull0Inc
09-Aug-2010, 05:18 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)