Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
How to display time local to a user?
Old 02-10-2010, 01:27 PM How to display time local to a user?
Skilled Talker

Posts: 53
Name: Wizzy
Trades: 0
Hello

At sign-up, I collect the user's country and set the nearest timezone (they can change this if it is incorrect).

Thanks
virtualmisc is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-10-2010, 02:19 PM Re: How to display time local to a user?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
How to display time local to a user
Use javascript.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-10-2010, 02:22 PM Re: How to display time local to a user?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
OR did you mean something like this
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-11-2010, 03:29 PM Re: How to display time local to a user?
dark_lord's Avatar
Experienced Talker

Posts: 41
Name: Parijat Roy
Location: INDIA-KOLKATA
Trades: 0
for those browsers which dont use javascript?
__________________
I AM THE BEAUTIFUL NIGHTMARE

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
dark_lord is offline
Reply With Quote
View Public Profile Visit dark_lord's homepage!
 
Old 02-11-2010, 03:34 PM Re: How to display time local to a user?
lynxus's Avatar
Awesomeo-Maximo

Posts: 1,618
Location: UK
Trades: 1
Quote:
Originally Posted by dark_lord View Post
for those browsers which dont use javascript?
Then your pretty much screwed.

PHP will display local ( server time )

Somehow you need to find out the users timezone, The best way is for javascript as this runs clientside.
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


lynxus is offline
Reply With Quote
View Public Profile Visit lynxus's homepage!
 
Old 02-12-2010, 12:39 AM Re: How to display time local to a user?
dark_lord's Avatar
Experienced Talker

Posts: 41
Name: Parijat Roy
Location: INDIA-KOLKATA
Trades: 0
i have some mobile sites which are displayed on mobile devices. not all mobile devices support javascript. so for the time being i am using the server time which is pretty much confusing. so i was thinking if there is any other way around. i already thought one about locating the country using their ip and then selecting the time zone, but i dont have the time zone table. also US has problem with DST. alternatively i have asked the user to input their timezone.

BUT Ya as u said

i am screwed.
__________________
I AM THE BEAUTIFUL NIGHTMARE

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
dark_lord is offline
Reply With Quote
View Public Profile Visit dark_lord's homepage!
 
Reply     « Reply to How to display time local to a user?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.36502 seconds with 12 queries