MastodonHelp/web/clitools/date2uts.php

11 lines
199 B
PHP
Raw Normal View History

2023-11-02 08:04:23 +01:00
#!/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);
?>