[pLog-svn] r6920 - plog/branches/lifetype-1.2/class/action
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Wed Sep 9 19:57:20 EDT 2009
Author: jondaley
Date: 2009-09-09 19:57:19 -0400 (Wed, 09 Sep 2009)
New Revision: 6920
Modified:
plog/branches/lifetype-1.2/class/action/blogaction.class.php
Log:
broaden search when looking for posts on a certain day, specifically when a timeOffset has been specified. Dare I say I think this bug might finally be killed, after 4 or 5 years of people complaining about it? :)
Modified: plog/branches/lifetype-1.2/class/action/blogaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/blogaction.class.php 2009-09-09 23:33:19 UTC (rev 6919)
+++ plog/branches/lifetype-1.2/class/action/blogaction.class.php 2009-09-09 23:57:19 UTC (rev 6920)
@@ -353,29 +353,24 @@
if( strlen($inDate) == 4 )
{
$year = $inDate;
- $outDate = Timestamp::getDateWithOffset( $year."0101000000", -$serverTimeOffset );
- $maxDate = Timestamp::getDateWithOffset( $year."1231235959", -$serverTimeOffset );
+ $outDate = Timestamp::getDateWithOffset( $year."0101000000", -abs($serverTimeOffset) );
+ $maxDate = Timestamp::getDateWithOffset( $year."1231235959", abs($serverTimeOffset) );
}
elseif ( strlen($inDate) == 6 )
{
$year = substr( $inDate, 0, 4 );
$month = substr( $inDate, 4, 2 );
$dayOfMonth = Date_Calc::daysInMonth( $month, $year );
- $outDate = Timestamp::getDateWithOffset( $year.$month."01000000", -$serverTimeOffset );
- $maxDate = Timestamp::getDateWithOffset( $year.$month.$dayOfMonth."235959", -$serverTimeOffset );
+ $outDate = Timestamp::getDateWithOffset( $year.$month."01000000", -abs($serverTimeOffset) );
+ $maxDate = Timestamp::getDateWithOffset( $year.$month.$dayOfMonth."235959", abs($serverTimeOffset) );
}
elseif ( strlen($inDate) == 8 )
{
$year = substr( $inDate, 0, 4 );
$month = substr( $inDate, 4, 2 );
$day = substr( $inDate, 6, 2 );
- $outDate = Timestamp::getDateWithOffset( $year.$month.$day."000000", -$serverTimeOffset );
- //$maxDate = Timestamp::getDateWithOffset( $year.$month.$day."235959", -$serverTimeOffset );
- //
- // Fix for issue http://bugs.lifetype.net/view.php?id=1018
- // Although I am not sure if this fix will have other consequences...
- //
- $maxDate = Timestamp::getDateWithOffset( $year.$month.$day."235959", 0 );
+ $outDate = Timestamp::getDateWithOffset( $year.$month.$day."000000", -abs($serverTimeOffset) );
+ $maxDate = Timestamp::getDateWithOffset( $year.$month.$day."235959", abs($serverTimeOffset) );
}
else
{
More information about the pLog-svn
mailing list