Get time and date like google??

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
When in google you type time or date ...
it display answer - correct time means get your time zone and
converted to correct time...

e.g. suppose you are in india ..
it automatically detect time zone convert it added +5.30
and display result.

same as whether you are in us or uk it display correct time for

same functionality i want to use to display time...

On my registration page i didn't take any time zone or country for
When anybody visit my site..i want to display his time and date..
so how find time like google using ip or anything ??

How to do this??
any google api or ??

Re: Get time and date like google?? wrote:
Quoted text here. Click to load it

There are places where you can can get a location from the ip address,
but they are quite unreliable.  Not because their database is
unreliable, but because with servers and proxies, there is no way to
tell with any accuracy where the user is.  For instance, when I use my
dialup service, it says I'm in New York City, even though I'm in
Washington, DC, because that's where their servers are.  Same time zone,
but what if I'm in Los Angeles?

The best way is to just ask the user where he/she is and keep it in
their profile.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Re: Get time and date like google??

On 28 Apr, 09:37, wrote:
Quoted text here. Click to load it

By default clients do not send any information to a HTTP server about
what time they think they are at, nor what time zone they think they
are in - but the javascript date object supports these. MS handling of
timezones is different from everybody else does, but even still
jscript should support the getTimezoneOffset and the setUTC....
methods for dates.

Rather than changing the TZ on the server for every script execution,
I'd be tempted to solve this one by writing out the pages with any
times as UTC in a SPAN of a specific class and adding in a javascript
file to read then update the contents of the SPAN to the clients
timezone called from the onload() method. In addition to offloading
the work from your server, you'd also make more of your content


Site Timeline