how to adjust clock at lavair sc

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    how to adjust clock at lavair sc

    webmaster help me

    #2
    You can use function to make your own time function
    PHP Code:
    function your_time(){
    $to_adjust = (60 60); // $to_adjust = (HOURs * MINs * SECs);
    $your_time time() + $to_adjust;
    return 
    $your_time;

    OR

    Change the default of your timezone
    PHP Code:
    date_default_timezone_set(Asia/Hong_Kong); 
    For timezone list, go here PHP: List of Supported Timezones - Manual
    Did I help you?
    You can help me too
    Your donations will help me finance my studies.

    Comment


      #3
      ok, well you could go about this differently too...

      if you add a field in the users table for timezone, then you can use the
      date_default_timezone_set(Asia/Hong_Kong);
      command to change time to users timezone so that it shows their time...

      you would need to add a timezone list to the register form so they can select the closest timezone to their own...

      something similar to this function, just link it to the database...


      so
      code is:
      /////////////////////////////////////////////////////
      /////////////function//////////////////////////////
      function clockbar($timezone)
      {
      date_default_timezone_set("$timezone");
      $timenow = time();
      $newdate = date('D jS M y',$timenow);
      $timenow = date("h:i:s A", $timenow);
      echo "<div style=\"border:2px grey inset; background:grey\" align=\"center\">";
      echo "Time In: $timezone:<br/>";
      echo "<small><b>";
      echo "Time: $timenow<br/>Date:$newdate";
      echo "</b></small>";
      echo "</div>";
      }
      ////////////////////////////////////////////////////////////////////
      $timezone = mysql_fetch_array(mysql_query("SELECTtimezone FROM ibwf_users WHERE id='".$uid."'"));

      echo "".clockbar($timezone[0])."";
      ////////////////////////////////////////////////////////////////////
      C3 Themes: http://c3themes.wen.ru/index.html
      Find Files: http://mystarter.tk/?goto=X-search

      Comment


        #4
        ok dude, read this:
        date manual
        that should help you out...

        and generally if you use the date set timezone command you put that in config.php so that the timezone is set all the time...

        date_default_timezone_set manual

        that will give you more than i know about the command, lol... where you think i learned what i know? gooogle man...
        C3 Themes: http://c3themes.wen.ru/index.html
        Find Files: http://mystarter.tk/?goto=X-search

        Comment

        Working...
        X