Renamed from “utstodate.php”
This commit is contained in:
parent
9a606c059a
commit
41182ecb5b
1 changed files with 10 additions and 0 deletions
10
web/clitools/uts2date.php
Executable file
10
web/clitools/uts2date.php
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/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);
|
||||
?>
|
Loading…
Reference in a new issue