Changeset 688
- Timestamp:
- 05/05/06 20:16:32
- Files:
-
- trunk/plagger/lib/Plagger/Date.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/plagger/lib/Plagger/Date.pm
r687 r688 7 7 use UNIVERSAL::require; 8 8 9 sub rebless { 10 my($class, $dt) = @_; 11 bless $dt, $class; 12 } 9 sub rebless { bless $_[1], $_[0] } 13 10 14 11 sub parse { … … 24 21 25 22 my $dt = $module->parse_datetime($date) or return; 26 $class->rebless($dt); 23 24 # If parsed datetime is floating, don't set timezone here. It should be "fixed" in caller plugins 25 unless ($dt->time_zone->is_floating) { 26 $dt->set_time_zone( Plagger->context->conf->{timezone} || 'local' ); 27 } 28 29 bless $dt, $class; 27 30 } 28 31
