Code: Select all
input $par, "Edit Timestamp parameters, please:", ' m, "2009-03-21 15:32:27"'; timestamp $par;Code: Select all
input $par, "Edit Timestamp parameters, please:", ' m, "2009-03-21 15:32:27"'; timestamp $par;I needed some time to understand this...neutrox wrote:Someone please explain me why timestamp is failing with this simple one, stamping current time instead of specified by input?Code: Select all
input $par, "Edit Timestamp parameters, please:", ' m, "2009-03-21 15:32:27"'; timestamp $par;
Code: Select all
timestamp 'm', '"...date..."';
timestamp 'm, "...date..."';Code: Select all
$par = input("Edit Timestamp parameters, please:", "System default is: <date> (format MATTERS!)<crlf>c - created, m - modified, a - accessed (00:00 as hour);<crlf>use in any combination/order or empty for all", ' m, "21/3/2009 15:32:27"');
timestamp $par;Sorry: the basic problem is the same as before!neutrox wrote:Gives me the same.Code: Select all
$par = input("Edit Timestamp parameters, please:", "System default is: <date> (format MATTERS!)<crlf>c - created, m - modified, a - accessed (00:00 as hour);<crlf>use in any combination/order or empty for all", ' m, "21/3/2009 15:32:27"'); timestamp $par;
And the stepped script displays timestamp m, "21/3/2009 15:32:27" which seems to be in accord with what you said plus works as stated ie from the address bar...
It would be difficult to me to enforce my script to follow your quoting method. Can you give it a fix them?
Code: Select all
$par1 = gettoken($par, 1, ",");
$par2 = gettoken($par, 2, ",");
timestamp $par1, $par2;Sorry: I don't understand that...neutrox wrote:Separator was ", " instead of "," (maybe unnecessary as the real problem was the next one) and quotes should have to go, then the problem was solved. Thanks!
Code: Select all
$x=func($a,$b); // is *identical*] to:
$x = func( $a , $b );You're right.neutrox wrote:
Separator was ", " instead of "," (maybe unnecessary asthe real problem was the next one) and quotes should have to go, then the problem was solved. Thanks!
Code: Select all
$par = input("Edit Timestamp parameters, please:", "System default is: <date> (format MATTERS!)<crlf>c - created, m - modified, a - accessed (00:00 as hour);<crlf>use in any combination/order or empty for all", " m, 21/3/2009 15:32:27");
$par1 = gettoken($par, 1, ", ");
$par2 = gettoken($par, 2, ", ");
timestamp $par1, $par2;Sorry to say: I understood it wrong, and so I said it wrongneutrox wrote:You're right.neutrox wrote:
Separator was ", " instead of "," (maybe unnecessary asthe real problem was the next one) and quotes should have to go, then the problem was solved. Thanks!
Then the remaining problem was just with the quoting.
Code: Select all
$par = input("Edit Timestamp parameters, please:", "System default is: <date> (format MATTERS!)<crlf>c - created, m - modified, a - accessed (00:00 as hour);<crlf>use in any combination/order or empty for all", " m, 21/3/2009 15:32:27"); $par1 = gettoken($par, 1, ", "); $par2 = gettoken($par, 2, ", "); timestamp $par1, $par2;
Code: Select all
timestamp " m", " ...date...";Code: Select all
$par1 = trim(gettoken($par, 1, ","), " ");
$par2 = trim(gettoken($par, 2, ","), " ");
timestamp $par1, $par2;