Jump to content

retrieve current date


chxxangie

Recommended Posts

just use this line before you echo current date.

putenv("TZ=Europe/Amsterdam"); // To return time+date of Amsterdam
$current_date     = date('Y-m-d');
echo $current_date;

 

this is a new knowledge for me... it can display the date and time as well... and i don't need to do extra calculation to add 8 hours for the time.

thanks for your helping... thank you so much!!!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

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.