0

I am programming forum script and I have problem in time because the server time defrent from my country time;
I tried to use this own function but the problem transferred to my friends in other countries hhhhh:

function ftime($time, $reg = false)
{
    $time = $time ;
    $mytime = protect($_SESSION['mytime']);
    $time = $time + $mytime;
    $time2 = time() - 3600  + $mytime;
}

** note : this not all of my function

2
  • 2
    You need javascriot for this Commented Jan 29, 2013 at 18:12
  • @JohnConde --> how to do that?? Commented Jan 29, 2013 at 18:16

2 Answers 2

1

PHP is a server side language and can not directly get client's Time. You will have to check for timezones and write your own function with a little help from client side scripts.

Sign up to request clarification or add additional context in comments.

2 Comments

thank you,, is there a free ready function or class for that??
Yeah there will be plenty. Just google 'javascript get client time' and you will get many
0

exactly, you need some help from js to determine the timezone.

check this ones:

How to get client's timezone?

Determine a User's Timezone

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.