Jump to content
Killersites Forums

I Cannot See My Time Prob


Recommended Posts

time.php

 

 

 

<?php

 

include("conf.php");

function getlang($language, $charset) {

global $lang;

global $diff;

global $char;

if (!isset($lang) || empty($lang) || $lang == "false") {

$found_lang[0] = strtolower(substr($language,0,3)) . '_' . strtoupper(substr($language,0,3));

$found_lang[1] = strtolower(substr($language,0,3)) . '-' . strtoupper(substr($language,0,3));

$found_lang[2] = strtolower(substr($language,0,2)) . '_' . strtoupper(substr($language,0,2));

$found_lang[3] = strtolower(substr($language,0,2)) . '-' . strtoupper(substr($language,0,2));

} else {

$found_lang[0] = strtolower(substr($lang,0,3)) . '_' . strtoupper(substr($lang,0,3));

$found_lang[1] = strtolower(substr($lang,0,3)) . '-' . strtoupper(substr($lang,0,3));

$found_lang[2] = strtolower(substr($lang,0,2)) . '_' . strtoupper(substr($lang,0,2));

$found_lang[3] = strtolower(substr($lang,0,2)) . '-' . strtoupper(substr($lang,0,2));

}

if (!isset($char) || empty($char) || $char == "false") {

$char = $charset;

}

$lang = array($found_lang[0],$found_lang[1],$found_lang[2],$found_lang[3]);

if (function_exists('mb_convert_encoding')) {

setlocale(LC_ALL, $lang);

$date = ucwords(strftime("%A, %d %B %Y")) . " " . gmdate("H:i:s", time() + $diff);

$time = mb_convert_encoding($date, "$char");

} else {

setlocale(LC_ALL, $lang);

$time = ucwords(strftime("%A, %d %B %Y")) . " " . gmdate("H:i:s", time() + $diff);

}

echo $time;

}

?>

 

 

conf.php

 

 

 

<?php

 

$lang = "eng"; // Put your language or put false

// For example: "eng" or "ita" or "deu" or "fra"... or "false"

$char = "ISO-8859-1"; // Put your charset or put false

// For example: "UTF-8" or "ISO-8859-1"... or "false"

$diff = "0"; // Change this with your different GMT time

?>

 

It is an hour out I thought I had set it to GMT

 

I am in the uk by the way!

but it is 1 hour behind pls help anyone thanks

Edited by talos
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...