Welcome to Geeklog, Anonymous Friday, March 29 2024 @ 04:41 am EDT

Geeklog Forums

Time Zone Block


Status: offline

trampoline

Forum User
Full Member
Registered: 02/24/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
Text Formatted Code
function phpblock_timezone() {
        global $_CONF;
        include_once($_CONF['path_html'] . "/timezone/main.php");
        return display_timezone();
}


main.php code

Text Formatted Code


<?php

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
}




?>
 
 Quote

All times are EDT. The time is now 04:41 am.

  • 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