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

Posted on 2008-11-06
Last Modified: 2012-05-05
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?
Question by:Loganathan Natarajan
    LVL 6

    Expert Comment

    Hi there,

    Try this, hope it helps.

    //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

    LVL 36

    Author Comment

    by:Loganathan Natarajan
    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?
    LVL 107

    Expert Comment

    by:Ray Paseur
    Take a look at this page:

    Also, see here:

    HTH, ~Ray
    LVL 36

    Author Comment

    by:Loganathan Natarajan
    i don't think this would help to me?

    as i need to retrieve or get the date to display...
    LVL 107

    Accepted Solution

    It looks like is doing what you want.  Why not CURL that page?  Or better yet, contact them and ask how they sync the time.
    LVL 36

    Author Comment

    by:Loganathan Natarajan
    OK, i shall study on that.


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    This is a general how to create your own custom plugin system for your PHP application that you designed (or wish to extend a third party program to have plugin functionality that doesn't have it yet).  This is not how to make plugins for existing s…
    Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now