Changeset 1744 for branches/release-33/lib/MT/AtomServer.pm
- Timestamp:
- 04/03/08 08:14:20 (20 months ago)
- Files:
-
- 1 modified
-
branches/release-33/lib/MT/AtomServer.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-33/lib/MT/AtomServer.pm
r1174 r1744 557 557 if (my $iso = $atom->issued) { 558 558 my $pub_ts = MT::Util::iso2ts($blog, $iso); 559 my @ts = MT::Util::offset_time_list(time, $blog->id);560 my $ts = sprintf '%04d%02d%02d%02d%02d%02d',561 $ts[5]+1900, $ts[4]+1, @ts[3,2,1,0];562 559 $entry->authored_on($pub_ts); 563 if ($pub_ts > $ts) { 560 if ( 0 < MT::DateTime->compare( blog => $blog, 561 a => $pub_ts, 562 b => { value => time(), type => 'epoch' } ) 563 ) 564 { 564 565 $entry->status(MT::Entry::FUTURE()) 565 566 } … … 647 648 if (my $iso = $atom->issued) { 648 649 my $pub_ts = MT::Util::iso2ts($blog, $iso); 649 my @ts = MT::Util::offset_time_list(time, $blog->id);650 my $ts = sprintf '%04d%02d%02d%02d%02d%02d',651 $ts[5]+1900, $ts[4]+1, @ts[3,2,1,0];652 650 $entry->authored_on($pub_ts); 653 if ($pub_ts > $ts) { 651 if ( 0 < MT::DateTime->compare( blog => $blog, 652 a => $pub_ts, 653 b => { value => time(), type => 'epoch' } ) 654 ) 655 { 654 656 $entry->status(MT::Entry::FUTURE()) 655 657 }
