Menu

Timestamp issue

Help
2005-04-20
2013-03-22
  • Richard Crawford

    I know that PB is probably meant to be kept on local servers, but where in a situation where it's kept on a remote server in a different timezone (EST).  Is there a way within PB to adjust it so that it reflects our local timezone (PST) when logging user access?

     
    • Philip X

      Philip X - 2005-05-05

      I'm not really sure it'll work, but try the following.
      In coreconfig.php locate the following lines, towards the end of the file:
      $CFG->now = date($CFG->textual_date);
      $CFG->timestamp = date("Y-m-d H:i:s");
      $CFG->unique = date("U");

      Try and replace them with:
      $CFG->now = date($CFG->textual_date, strtotime('-2 hour');
      $CFG->timestamp = date("Y-m-d H:i:s", strtotime('-2 hour');
      $CFG->unique = strtotime('-2 hour');

      where in this example the -2 is the time difference between the server and your desired time-zone (this would be if, for example, the server is in EST and you're in CST. If your server were in PST and you were in CST that would become +2 hour)...

      Let me know if it works please.
      Thanks!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.