Jump to content
xisto Community
Sign in to follow this  
tux_linux

Time In Php

Recommended Posts

HI!I have a question about time in php. I get the time with this syntax:<?$time=getdate();print_r($time);?>So my problem is that the time isn´t right???????I am from austria and so i must select the timezone, but how can i do this???Is the servertime right????thx tux

Share this post


Link to post
Share on other sites

Try this:

<?php//If your server time is GMT.$austria_time  = date("M j Y, D G+1:i:s");echo $austria_time;//Result: Nov 3 2004, Wed 21:45:08$austria_time1  = date("M j Y, D h+1:i a");echo $austria_time1;//Result: Nov 3 2004, Wed 9:45 pm?>

It should work, if it does not, let me know.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.