I need to add just 500ms to a specific date. To add, for example, 1 day to a date, I know I can write this:
$tomorrow = date("d-m-Y",strtotime("+1 day"));
To add 500 milliseconds to a date, instead, I tried with
strotime("+500 milliseconds",date(...
but it's not working, date becomes 00-00 etc., or sometimes it remains the same.
Thanks for any help, Alberto
If you would like to work with milliseconds, you can check out microtime()
.
To advance the current time by 500 milliseconds ahead, you can use:
microtime(true) + 0.5
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments