11 lines
202 B
PHP
11 lines
202 B
PHP
|
#!/usr/bin/php
|
||
|
<?php
|
||
|
const N="\n";
|
||
|
if (!isset($argv[1]) || preg_match('/^\d+$/',$argv[1])!==1) {
|
||
|
echo('utstodate.php <unix timestamp>'.N);
|
||
|
exit(1);
|
||
|
}
|
||
|
echo(date('Y-m-d H:i:s',$argv[1]).N);
|
||
|
exit(0);
|
||
|
?>
|