Is there PHP web service to display the IST date and time?

I need a php web service to display  the IST time. In my website the date is often changed, So I could not either convert them to my IST date and time or display the current date and time?
LVL 36
Loganathan NatarajanLAMP DeveloperAsked:
Who is Participating?
 
Ray PaseurConnect With a Mentor Commented:
It looks like http://wwp.greenwichmeantime.com/time-zone/asia/india/time.htm is doing what you want.  Why not CURL that page?  Or better yet, contact them and ask how they sync the time.
0
 
cr4ck3rj4ckCommented:
Hi there,

Try this, hope it helps.

CJ
<?php
//Get GMT Date/Time and adds offset to IST
echo gmdate("F j, Y, g:i a", strtotime("+5 hours 30 minutes")); 
?>

Open in new window

0
 
Loganathan NatarajanLAMP DeveloperAuthor Commented:
Thanks for the reply. I have already this code and displaying the IST time. My actual problem is the server GMT time gets varies every day. It is not reliable ... as i am using shared hosting.. very difficult to explain this problem to them... also they just reset and again the problem arise ... so i  don't want to depend on them ... that is why i want to access the web services....

any ideas?
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Ray PaseurCommented:
Take a look at this page:
http://wwp.greenwichmeantime.com/time-zone/asia/india/time.htm

Also, see here:
http://www.ntp.org/

HTH, ~Ray
0
 
Loganathan NatarajanLAMP DeveloperAuthor Commented:
i don't think this would help to me?

as i need to retrieve or get the date to display...
0
 
Loganathan NatarajanLAMP DeveloperAuthor Commented:
OK, i shall study on that.

Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.