Re: Date manipulation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 25, 2012 at 3:06 PM, Ron Piggott
<ron.piggott@xxxxxxxxxxxxxxxxxx> wrote:
>
> Is it possible for PHP to accept the following as a date:
>
> 04:11:22 Aug 21, 2011 PDT
>
> so I may output it as:
>
> gmdate(‘Y-m-d H:i:s’)
>
> - I want the time zone included

    Sure.

<?php

$ds = strtotime('04:11:22 Aug 21, 2011 PDT');

echo gmdate('Y-m-d H:i:s',$ds);

?>

-- 
</Daniel P. Brown>
Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux