Welcome to Geeklog Saturday, November 27 2021 @ 12:07 pm EST

Geeklog Forums

Time Zone Block

Status: offline


Forum User
Full Member
Registered: 24/02/06
Posts: 392
I am trying to develop a time zone block, I am just starting so not getting very far yet, I have a question.
I have created the Block and the code in Lib.custom and a corresponding page of php for the function.
But... The time i want appears in the top left hand of the browser not the block created for it ???

Lib.custom code
PHP Formatted Code
function phpblock_timezone() {
        global $_CONF;
        include_once($_CONF['path_html'] . "/timezone/main.php");
        return display_timezone();

main.php code

PHP Formatted Code


function display_timezone()  {
    global $_TABLES, $_CONF;

$date=date(U); // format date for calculation in seconds
//print ("$date");  //if you want to see the date format now
$hourdiff = "5.5"; //change the server time plus one hour
$timeadjust = ($hourdiff * 60 * 60); //this is how to calc it
$adjtime = date(" l d H:i", $date + $timeadjust); //format display
print ("$adjtime");  //print the adjusted time


All times are EST. The time is now 12:07 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content