note 23966 added to function.shell-exec

From: Date: Fri, 02 Aug 2002 11:22:32 +0000
Subject: note 23966 added to function.shell-exec
Groups: php.notes 
Request: Send a blank email to php-notes+get-34142@lists.php.net to get a copy of this message
This script: ... elif [ "$1" = "ALL" ]; then NOW=/bin/date +%s START=$(/bin/date -d "sed -n -e 's/Log\ started\ on\ //p' uptime.log" +%s) echo -n $(expr $NOW - $START) ... gives 2075955 on the console, which is correct. In PHP, it gives 40799. I narrowed the problem down to being the date -d line that does not seem to parse correctly to PHP. I use date without -d in other places and it gives the same result as on the terminal. PHP is buggy x( -- http://www.php.net/manual/en/function.shell-exec.php http://master.php.net/manage/user-notes.php?action=edit+23966 http://master.php.net/manage/user-notes.php?action=delete+23966 http://master.php.net/manage/user-notes.php?action=reject+23966

« previous php.notes (#34142) next »