MastodonHelp/web/clitools/date2uts.php
2023-11-02 08:04:23 +01:00

10 lines
199 B
PHP
Executable file

#!/usr/bin/php
<?php
const N="\n";
if (!isset($argv[1]) || preg_match('/^\d+-\d+-\d+$/',$argv[1])!==1) {
echo('datetouts.php <Y-M-D>'.N);
exit(1);
}
echo 'UTS: '.strtotime($argv[1]).N;
exit(0);
?>