Nothing fancy. I needed to make some files' creation dates 1 second apart, so I can keep them together when sorted by that field.
There are two choices on start:
shift amount - time difference between subsequent items' timestamps.
times to serialize - select which timestamp fields are to be serialized.
Code: Select all
"Timestamp Serializer"
$shift = input('Timestamp shift amount'.<crlf>.'[-+]<amount> <y|m|w|d|h|n|s|ms|us>', 'eg. +1 s, -5 d, 2500 ms etc', '+1 s',,, 350);
$stamp = inputselect('times to serialize'.<crlf>.'[shift: '.$shift.']', "creation time<crlf>modification time<crlf>access time", "<crlf>", 2,, 350, 210, 'Timestamp Serializer');
$stamp = regexreplace($stamp, '^([^\r\n]).*[\r\n]*', '$1','');
$items = <selitems |>;
$count = gettoken($items, 'count', '|');
$c = 1;
while ($c < $count) {
timestamp $stamp, gettoken($items, $c, '|'), gettoken($items, $c+1, '|'),, $shift;
$c++;
}