Skip to content

Commit c31e074

Browse files
committed
minor #1400 Update the database contents (javiereguiluz)
This PR was squashed before being merged into the main branch. Discussion ---------- Update the database contents When you browse this app, you see this: <img width="723" alt="database-before" src="https://user-images.githubusercontent.com/73419/218479596-897e5859-16ed-4fa0-a5c2-4e5e29eb8fec.png"> These super old dates hurt the image and reputation of the project, because it looks like the project is no longer maintained. So, let's regenerate the database contents to update the blog post dates: <img width="901" alt="database-after" src="https://user-images.githubusercontent.com/73419/218479814-0158ce4f-7c6b-4d52-811e-ec3e9c1307ff.png"> Commits ------- 6a35fe4 Update the database contents
2 parents d93d6f6 + 6a35fe4 commit c31e074

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

data/database.sqlite

-20 KB
Binary file not shown.

src/DataFixtures/AppFixtures.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ private function getPostData(): array
146146
$this->slugger->slug($title)->lower(),
147147
$this->getRandomText(),
148148
$this->getPostContent(),
149-
new \DateTime('now - '.$i.'days'),
149+
(new \DateTime('now - '.$i.'days'))->setTime(random_int(8, 17), random_int(7, 49), random_int(0, 59)),
150150
// Ensure that the first post is written by Jane Doe to simplify tests
151151
$user,
152152
$this->getRandomTags(),

0 commit comments

Comments
 (0)