Current location: Hot Scripts Forums » Programming Languages » PHP » Showing time is users time zone?


Showing time is users time zone?

Reply
  #1 (permalink)  
Old 11-20-03, 07:40 AM
Nasimov Nasimov is offline
New Member
 
Join Date: Nov 2003
Location: EarthPlanet
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Showing time is users time zone?

How could you show the time in the users time zone? I wouldn't mind having to ask them for there time zone when they sign up, I just need to know how to convert it and what-not.

Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 11-20-03, 08:14 AM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
basicly :
PHP Code:

$local_hour=date("h");

$time_zone=3;
//of course you can retraive the time zone from any database ..
//but this is only an example..
$current_hour=$time_zone+$local_hour;
echo 
$current_hour date(":i:s A"); 
NOTE
I havn't tried this and the idea just came into my mind while I was reading so it may not work ..
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]

Last edited by NeverMind; 11-20-03 at 08:17 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 01:14 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.