Skip to content

Commit

Permalink
fix(other): display commited date instead of the pull request creatio…
Browse files Browse the repository at this point in the history
…n date
  • Loading branch information
Baraka24 committed Jan 17, 2025
1 parent 1972b90 commit 7385a73
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/developer/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ public function process() {
$res['branch_name'] = $branch_name;
$res['commit_hash'] = $commit_hash;
$res['commit_url'] = $commit_url;
$commit_date_output = shell_exec("git show -s --format=%ci {$commit_hash}");

if ($commit_date != '-') {
$commit_date = new \DateTime($commit_date);
$commit_date = new \DateTime($commit_date_output);
$commit_date->setTimezone(new \DateTimeZone('UTC'));
$res['commit_date'] = $commit_date->format('M d, Y');
}
Expand Down

0 comments on commit 7385a73

Please sign in to comment.