summaryrefslogtreecommitdiff
path: root/public/app/views/simple/lorem-dates.php
blob: 7a7c000bd2a5dfc4b8d3fc5a7c4a9b0b23acda4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php 
function some_date() {
    $dt = new DateTime();
    $dt->setTimestamp(time() - rand(0,30000)*1000 + rand(1,1000) );

    // return time() - rand(0,30000)*1000 + rand(1,1000);
    return $dt->format('Y-m-d H:i:s');
}


include 'pythia.php';

$posts = $wiki->latest_posts(0, 900);

foreach($posts as $post) {
    $wiki->set_date($post['id'], some_date());
}
echo "done!";