Re: convert 12:12:00 to seconds
| From: | Andrey Hristov | Date: | Wed, 22 Aug 2001 13:40:35 +0000 |
| Subject: | Re: convert 12:12:00 to seconds | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-63899@lists.php.net to get a copy of this message | ||
Use gmmktime() or mktime()
example :
<?php
echo gmmktime(12,12,0,1,1,1970);
// format(hour,minute,second,month,day,year)
// counting starts from 1/1/1970 so if you set this day you will receive the
secongs
// gmmktime accoring GMT or mktime() accoring you local time (mine is GMT+3)
// so 12:12:00 used with gmmktime will give me how many seconds there are in
9:12:00h
?>
----- Original Message -----
From: "nafiseh saberi" <nsaberi@iraninfocenter.net>
To: <php-general@lists.php.net>
Sent: Thursday, August 23, 2001 4:30 PM
Subject: [PHP] convert 12:12:00 to seconds
>
> hi.
> how do I covert convert 12:12:00 to seconds ?
> I want to get time from system and covert it to seconds to do
> arithmetic work on it.
> thanks.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>