Bangladeshi Today Date With Time in PHP

Posted: January 12, 2011 in PHP5
Tags:


$day = gmdate("d");
$month = gmdate("m");
$year = gmdate("Y");
$hour = gmdate("H")+6;
$minute = gmdate("i");
$second = gmdate("s");
$today_date=@date("d-m-Y H:i:s", mktime ($hour,$minute,$second,$month,$day,$year));
echo "Today Date:".$today_date;

Advertisements
Comments
  1. Refat Sardar says:

    thank u for this post.Keep it up and always post this type of helpful coding.

  2. Buxfix says:

    Why not this way?
    <?php
    date_default_timezone_set('Asia/Dhaka');

    echo date('d-m-Y H:i:s').'’;
    ?>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s