Forum Moderators: coopster

Message Too Old, No Replies

how can I show dynamic date

         

An156

3:47 pm on Mar 25, 2009 (gmt 0)

10+ Year Member



how can we display date & time using AJAX in php?
plz suggest some time server websites from whr i can retrieve time & date.

Thanks in advance!

whoisgregg

6:08 pm on Mar 25, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you are using Javascript, Javascript can display the client machines time on it's own:

alert(Date());

And there's a bunch of ways purely in Javascript to manipulate that data. Will that be sufficient for your needs or do you need to get the actual server time?

An156

6:14 pm on Mar 25, 2009 (gmt 0)

10+ Year Member



since my hosting server is not supporting the javascript, can u plz explain any php method to retrieve country(india) time? i dont want to use system time.

d40sithui

6:59 pm on Mar 25, 2009 (gmt 0)

10+ Year Member



There's an addon that allows you to manipulate date with php. A a google search of "php get international time zone" yields this page which seems really simple to implement. [builderau.com.au...]

Also, I believe that javascript is a browser side language so its configuration is controlled by browser settings not server side. If you're using AJAX, you need javascript to make it work.

morfeas

7:22 pm on Mar 25, 2009 (gmt 0)

10+ Year Member



As i know javascript is client side scripting
so there is no server not support it
the only problem is if client supports javascript
so the advantage that php has is that if your
server supports php the client can see the time
even it does not support javascript but (most clients
ie ,mozilla ,opera ) support javascript