Skip to content

Commit

Permalink
[VkBridge] Correct post date calculating (RSS-Bridge#1417)
Browse files Browse the repository at this point in the history
* [VkBridge] Correct post date calculating

Before this commit, post dates from december past year were
calculated as december current year.
  • Loading branch information
em92 authored and teromene committed Jan 16, 2020
1 parent 1343dbe commit 46b9879
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bridges/VkBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@ private function getTime($post)
} elseif (strstr($strdate, 'yesterday ') !== false) {
$time = time() - 60 * 60 * 24;
$strdate = date('d-m-Y', $time) . ' ' . $strdate;
} elseif ($date['month'] && intval(date('m')) < $date['month']) {
$strdate = $strdate . ' ' . (date('Y') - 1);
} else {
$strdate = $strdate . ' ' . date('Y');
}
Expand Down

0 comments on commit 46b9879

Please sign in to comment.