summaryrefslogtreecommitdiff
path: root/public/app/views/simple/lorem-dates.php
diff options
context:
space:
mode:
authorGeorge Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-04-27 03:47:30 +0300
committerGeorge Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-04-27 03:47:30 +0300
commit059e0d95d0c28bc5060e87e146eaf7411f51bf90 (patch)
tree7c21ac432f16dde2329a0d5954d70711eceb48e6 /public/app/views/simple/lorem-dates.php
parent26cd8ee99659ef1926c96a049c93645ffc9b169d (diff)
downloadgyraf1gov-059e0d95d0c28bc5060e87e146eaf7411f51bf90.tar.gz
gyraf1gov-059e0d95d0c28bc5060e87e146eaf7411f51bf90.tar.bz2
gyraf1gov-059e0d95d0c28bc5060e87e146eaf7411f51bf90.zip
skeleton commit; based on an anom project
Diffstat (limited to 'public/app/views/simple/lorem-dates.php')
-rw-r--r--public/app/views/simple/lorem-dates.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/public/app/views/simple/lorem-dates.php b/public/app/views/simple/lorem-dates.php
new file mode 100644
index 0000000..7a7c000
--- /dev/null
+++ b/public/app/views/simple/lorem-dates.php
@@ -0,0 +1,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!"; \ No newline at end of file