Current location: Hot Scripts Forums » Programming Languages » Perl » perl dates (for rss feed)


perl dates (for rss feed)

Reply
  #1 (permalink)  
Old 11-15-05, 10:09 PM
gnznroses gnznroses is offline
Newbie Coder
 
Join Date: Oct 2005
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy perl dates (for rss feed)

although i've posted (nearly) the whole script, you only need to look at the bolded areas.

this makes no sense. the cgi script i have for my website creates an RSS feed which won't validate because a date is in the wrong format. there's two dates printed in the feed, pubdate and build date. build date validates fine. so i took the EXACT code for making the build date and copied it to the pubdate, but the pubdate still prints the exact same crap. like so:

<pubDate>20 Oct 05 2:42 PM</pubDate>
<lastBuildDate>14 Nov 2005 22:19:33 GMT</lastBuildDate>


i'm about to pull my hair out cause it just makes no sense whatsoever.


Quote:
#! CRADDON 1
#! NAME RSS File Advanced
#! DESCRIPTION Summarize news items in XML RSS format 0.91. RSS is the standard format for automatically exchanging news headlines. The Advanced version provides support for direct links to Maginot static files in multiple (different) profiles, plus Latin1 characters, plus improved formatting and handling of a few additional optional fields. Author: cerberos76@myrealbox.com (enhancing the original RSS File by Elvii)
#! VERSION beta build 5d
#! DOC 1

# ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~* ~*~*~*~*~*~*~*
# RSS File Advanced, rss 0.91 feed from your Coranto news
# © Cerberos76 (cerberos76@myrealbox.com)
# Donationware software (see readme.txt for details on the license)
# No modification and no redistribution is allowed in any form
# ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~* ~*~*~*~*~*~*~*

# The RSS File Advanced is an enhancement of the "RSS File" beta4 by Elvii

my $addon = new Addon('RSS File Advanced');
$addon->checkBuild(10);
$addon->addProfileType('RSS File');
$addon->registerAdminFunction('rssfile_editprof', 'RSSFile_EditProfile');
$addon->registerAdminFunction('rssfile_editprofsave', 'RSSFile_EditProfileSave');

# Adding a new profile (initialize fields)
my $AddProfile_NewType = <<'END_CODE';
#===== date/time
my @Monthsmall = (q~Jan~, q~Feb~, q~Mar~, q~Apr~, q~May~, q~Jun~, q~Jul~, q~Aug~, q~Sep~, q~Oct~, q~Nov~, q~Dec~);
my $difftime=0; # difference [hours] local time-server time
my ($sec,$min,$hour,$mday,$mon,$year,$wday)=(localtim e(time + (3600*$difftime)))[0..6];
$year += 1900; my $mon_ok=$mon+1;
# format rfc822, i.e. 02 Oct 2002 13:00:00 GMT
# time zone alternatives: "UT" / "GMT"
# ; Universal Time
# ; North American : UT
# / "EST" / "EDT" ; Eastern: - 5/ - 4
# / "CST" / "CDT" ; Central: - 6/ - 5
# / "MST" / "MDT" ; Mountain: - 7/ - 6
# / "PST" / "PDT" ; Pacific: - 8/ - 7
my $timezone="GMT";
$rss_advancedpubdate = sprintf ("%0.2d $Monthsmall[$mon] $year %0.2d:%0.2d:%0.2d $timezone", $mday, $hour, $min, $sec);



if ($proftype eq 'RSS File') {
$newsprofiles{$prof} = { 'enabled' => 0,
'textfile' => "$prof.xml",
'cats' => ['AllCategories'],
'agefilter' => '',
'numfilter' => '5',
'filepath' => '',
'type' => 'RSS File',
'channeltitle' => $CConfig{'SiteTitle'},
'channeldesc' => "The latest news from $CConfig{'SiteTitle'}.",
'channeltitlelink' => $CConfig{'SiteLink'},
'channellang' => 'en-gb',
'itemtitle' => '<Field: Subject>',
'itemlink' => 'http://www.mysite.com/news.html<ItemAnchor>',
'pubdate' => "$rss_advancedpubdate",
'ForceFullBuild' => 1};
}
END_CODE

$addon->hook('AddProfile_NewType', \$AddProfile_NewType);

# Display status message on Edit News Profiles
my $ProfileList_NewType_Status = <<'END_CODE';
if ($newsprofiles{$i}->{'type'} eq 'RSS File') {
$status = '';
if (!$newsprofiles{$i}->{'agefilter'} && !$newsprofiles{$i}->{'numfilter'}) {
$status .= 'This profile is not filtered by time or number. ';
}
else {
$status .= 'A maximum of ';
if ($newsprofiles{$i}->{'agefilter'}) {
$status .= "<b>$newsprofiles{$i}->{'agefilter'} days</b> ";
if ($newsprofiles{$i}->{'numfilter'}) {
$status .= ' or ';
}
}
if ($newsprofiles{$i}->{'numfilter'}) {
$status .= "<b>$newsprofiles{$i}->{'numfilter'} items</b> ";
}
$status .= 'will be included in this profile. ';
}
$status .= 'Profile type: <b>RSS File</b>. ';
}
END_CODE

$addon->hook('ProfileList_NewType_Status', \$ProfileList_NewType_Status);

# Display functions on Edit News Profiles
my $ProfileList_NewType_Functions = <<'END_CODE';
if ($newsprofiles{$i}->{'type'} eq 'RSS File') {
$actions .= '[' . $addon->link({'action' => 'admin', 'adminarea' => 'rssfile_editprof', 'profname' => $i}) . 'Edit</a>] ';
}
END_CODE

$addon->hook('ProfileList_NewType_Functions', \$ProfileList_NewType_Functions);

# Open file prior to building news
my $BuildNews_NewType_Open = <<'END_CODE';
if ($ProfType{$i} eq 'RSS File') {
$FilesOpened{$i} = $addon->open(">$ProfFilePath{$i}/$newsprofiles{$i}->{'textfile'}");
RSSFile_Initialize($addon, $i, $FilesOpened{$i});
}
END_CODE

$addon->hook('BuildNews_NewType_Open', \$BuildNews_NewType_Open);

# Call build routine, if necessary
my $BuildNews_ProfileType = <<'END_CODE';
if ($ProfType{$i} eq 'RSS File') {
RSSFile_BuildItem($i, $FilesOpened{$i});
}
END_CODE

$addon->hook('BuildNews_ProfileType', \$BuildNews_ProfileType);

# Finish off a profile.
my $BuildNews_CloseFile = <<'END_CODE';
if ($ProfType{$key} eq 'RSS File') {
print $value '</channel></rss>';
}
END_CODE

$addon->hook('BuildNews_CloseFile', \$BuildNews_CloseFile);

# Build an RSS File profile (for each news item)
$Subs{'RSSFile_BuildItem'} = <<'END_SUB';
sub RSSFile_BuildItem {
my ($i, $fh) = @_;
my $titlesub = 'RSSFileStyle_' . $i . '_title';
my $linksub = 'RSSFileStyle_' . $i . '_link';
my $descsub = 'RSSFileStyle_' . $i . '_desc';
my $newsht;
print $fh '<item>';

# Title
#=============
$newsht = &$titlesub();
if ($newsht eq ""){ #forgot title....
my $des=$Text;
$newsht = substr(HTMLstrip($des), 0, 20). "...";
}
#character encoding & Latin 1 conversion
#take care of accented characters
$newsht =~ s/([^ \t\n!-~])/sprintf("&#%2d;", ord($1))/eg;
$newsht =~ s/>/&gt;/g; $newsht =~ s/</&lt;/g;
$newsht =~ s/&# 147;/"/g; $newsht =~ s/&# 148;/"/g; #remove the space before the numbers...
$newsht =~ s/&(?!(#[0-9]+|#x[0-9a-fA-F]+|\w+)/&amp;/g;
#convert from Latin-1 to UTF-8
$newsht =~ s/([\x80-\xFF])/chr(0xC0|ord($1)>>6).chr(0x80|ord($1)&0x3F)/eg;
print $fh '<title>' . substr(HTMLstrip($newsht), 0, 100) . '</title>';
#print "<br>\n title: $newsht";

# Link
#=============
if ($newsprofiles{$i}->{'itemlink'} ne "advanced") {
$newsht = &$linksub();
#print "<br>\n link: $newshtml";
}
else { # added support for multiple maginot profiles
my $adv_link=&rssadv_findURL();
$newsht = $adv_link;
#print "<br>\n advlink: $newsht";
}
#character encoding & Latin 1 conversion
#take care of accented characters
$newsht =~ s/([^ \t\n!-~])/sprintf("&#%2d;", ord($1))/eg;
$newsht =~ s/>/&gt;/g; $newsht =~ s/</&lt;/g;
$newsht =~ s/&(?!(#[0-9]+|#x[0-9a-fA-F]+|\w+)/&amp;/g;
#convert from Latin-1 to UTF-8
$newsht =~ s/([\x80-\xFF])/chr(0xC0|ord($1)>>6).chr(0x80|ord($1)&0x3F)/eg;
print $fh '<link>' . substr(HTMLstrip($newsht), 0, 500) . '</link>';

# Description
#=============
if ($newsprofiles{$i}->{'itemdesc'}) {
if ($newsprofiles{$i}->{'itemdesc'} !~ /advanced/) {
$newsht = &$descsub();
$newsht = substr(HTMLstrip($newsht), 0, 500);
}
else { #advanced (internal) formatting
my ($advanced, $len) = split(/-/,$newsprofiles{$i}->{'itemdesc'});
my $des=$Text; my $defaultlen=350;
if ($len eq "") {$len=$defaultlen;}
if(length($des) > $len) {
while (substr($des, $len, 1) =~ /\S/) {
$len++ ;
}#end while
$des = substr($des, 0, $len);
$newsht=$des. "...";
}#end if lenght
else {
$newsht= $des;
}
$newsht =~ s/<(br|BR|p|P)>/\n/g ;
#$des =~ s/([\t\n])/sprintf("&#%2d;", ord($1))/eg; #preserve \n and \t
$newsht =~ s/([\t\n])/" &nbsp; &nbsp; &nbsp; "/eg; #preserve \n and \t
$newsht =~ s/<[^>]+>//g; #strips html

}#end else (advanced formatting)

#print "<br>\n descr: $newsht";
#character encoding & Latin 1 conversion
#take care of accented characters
$newsht =~ s/([^ \t\n!-~])/sprintf("&#%2d;", ord($1))/eg;
$newsht =~ s/>/&gt;/g; $newsht =~ s/</&lt;/g;
$newsht =~ s/&# 147;/"/g; $newsht =~ s/&# 148;/"/g;
#remove the space before the numbers...
$newsht =~ s/&(?!(#[0-9]+|#x[0-9a-fA-F]+|\w+)/&amp;/g;
#convert from Latin-1 to UTF-8
$newsht =~ s/([\x80-\xFF])/chr(0xC0|ord($1)>>6).chr(0x80|ord($1)&0x3F)/eg;
print $fh '<description>' . $newsht . '</description>';
}#end if description
print $fh "</item>\n";
}
END_SUB


#================================================= =========
# Routines to find the URL of the current news (internally)
#================================================= =========

# routine added to find (internally) the news-URL
# necessary if you use multiple Maginot profiles in the same RSS-feed
# method:
# a/ looks for Maginot Profiles
# (if more than one Maginot profile is found, will select the first in alphabetical order)
# b/ if there is no Maginot profile containing the news, it tries "standard" profile with a call to ViewnewsFixed
# c/ if it is not a standard profile will use an old viewnews call

sub rssadv_findURL {
my @maginotprofiles,@standardprofiles,@otherprofiles; my $ShowNews="";
my ($vnin, $vn);
my ($pcat, $prof);
my $unkownprofoff=0; #=0: display also "unknown" profiles (viewnews link), =1: not display them
my $urlscript = 'http://'.($ENV{'HTTP_HOST'}?$ENV{'HTTP_HOST'} : $ENV{'SERVER_NAME'}).($ENV{'SERVER_PORT'} != 80 && $ENV{'HTTP_HOST'} !~ /:/ ? ":$ENV{'SERVER_PORT'}" : ''). $ENV{'SCRIPT_NAME'};
$vnin="viewnews"; $urlscript =~ s/(\w+).(\w+)$/$vnin.$2/g;
$vn="$urlscript";

#ReadProfileInfo();
if ($EnableCategories) {
#find the profiles for the category of the actual news
foreach $prof (keys %newsprofiles) {
unless ( $newsprofiles{$prof}->{enabled} ) { next; }
foreach $pcat (@{$newsprofiles{$prof}->{'cats'}}) {
if (($pcat eq $Category)||($pcat eq "AllCategories")){ #found a good profile ($pcat)!
if (($newsprofiles{$prof}->{'type'}) =~ /Maginot/ ){
push(@maginotprofiles,$prof);}
elsif (($newsprofiles{$prof}->{'type'}) =~ /Standard/ ){
push(@standardprofiles,$prof);}
else {push(@otherprofiles,$prof);}
}#if $pcat eq category
}#foreach pcat
}#foreach $prof

if (@maginotprofiles){
sort @maginotprofiles;
$prof=$maginotprofiles[0];
#============= Maginot
my $magurlnew=&rssadv_MaURL("$prof");
$ShowNews.="$magurlnew";
}#if maginot profile is not empty

elsif (@standardprofiles){
sort @standardprofiles;
$prof=$standardprofiles[0];
#Find the URLs for the given Standard profile
#============= Standard Profile, use ViewnewsFixed
#=== additions (for ViewNews Fixed 1.4+)
#find news (i.e. profile) template file and style
my $newstemplate= $newsprofiles{$prof}->{tmplfile};
my $newsstyle= $newsprofiles{$prof}->{style};
#format those parameters for viewnews fixed
if (($newstemplate =~ /(none)/i)||($newstemplate eq "")) {
$newstemplate = "viewnews.tmpl";
}
$newstemplate =~ /^(.+)\.([^\.]+)$/;
my $fronttmpl = $1; my $exttmpl = $2;

$newsstyle =~ /^(NewsStyle)_([^\.]+)$/;
my $frontstylename = $1; my $stylename = $2;
if ($stylename =~ /Default$/i) {
$stylename = 'Default+News+Style';
} elsif ($stylename =~ /DefaultHeadline$/i) {
$stylename = 'Default+Headline+Style';
} else {
$stylename =~ s/ /+/g;
}
$ShowNews.="$vn?id=$newsid&amp;style=$stylename&am p;tmpl=$fronttmpl";
}#end elsif (i.e.if news is not maginot)

else { #============= Unknown profile
if ($unkownprofoff==0){
$ShowNews.="$vn?id=$newsid";
}#end if $unkownprofoff=0 (i.e. unkown profiles on)
}#end else

}#if enable categories

else { #no category addon...
$ShowNews.="$vn?id=$newsid&amp;style=$stylename&am p;tmpl=$fronttmpl";
}#else (no categories)

return $ShowNews;
}#sub rssadv_findURL


#==============================
# Maginot URL finder subroutine
#==============================
sub rssadv_MaURL {
my $prof = shift;
#ReadConfigInfo();
if ( $newsprofiles{$prof}->{enabled} ) { #go on if enabled
if( $newsprofiles{$prof}->{'type'} eq 'Maginot Static' ) {
$PPStaticOpts{$prof} = {
staticfield => $newsprofiles{$prof}->{'ppstaticfield'} || 'newsid',
maxlength => $newsprofiles{$prof}->{'ppstaticmaxfnlength'} || 26,
filext => $newsprofiles{$prof}->{'ppstaticfilext'} || $CConfig{'ArcHtmlExt'},
dirurl => $newsprofiles{$prof}->{'ppstaticdirurl'} || ''
};#ppstatic
}#end if (i.e. Maginot static)
elsif( $newsprofiles{$prof}->{type} eq 'Maginot Static Split' ) {
my( @splitsubs, @splittmpl );
push( @splitsubs, $newsprofiles{$prof}->{style} );
push( @splittmpl, $newsprofiles{$prof}->{tmplfile} ) if( $newsprofiles{$prof}->{tmplfile} );
@_ = split( /;*\s*;\s*;*/, $newsprofiles{$prof}->{ppsplittmpl} );
foreach my $i (@_) {
push( @splittmpl, $i ) if( $i );
}
@_ = split( /;*\s*;\s*;*/, $newsprofiles{$prof}->{ppsplitsubs} );
foreach my $i (@_) {
$i =~ s/[^a-z0-9_]//g;
push( @splitsubs, qq~NewsStyle_$i~ ) if( $i );
}
$PPStaticOpts{$prof} = {
staticfield => $newsprofiles{$prof}->{'ppstaticfield'} || 'newsid',
maxlength => $newsprofiles{$prof}->{'ppstaticmaxfnlength'} || 26,
filext => $newsprofiles{$prof}->{'ppstaticfilext'} || $CConfig{'ArcHtmlExt'},
dirurl => $newsprofiles{$prof}->{'ppstaticdirurl'} || ''
};#end ppstatic
@{$PPStaticOpts{$prof}->{splittmpl}} = @splittmpl;
@{$PPStaticOpts{$prof}->{splitsubs}} = @splitsubs;
}#end elseif (i.e. maginot split)

my $f = ${$PPStaticOpts{$prof}->{'staticfield'}};
$f =~ s~[^A-Za-z0-9\-\.]~~g;
$f = substr( $f, 0, $PPStaticOpts{$prof}->{'maxlength'} ) . '.' . $PPStaticOpts{$prof}->{'filext'};
$f = qq~$PPStaticOpts{$prof}->{'dirurl'}/$f~;
#try to prevent user errors (when they use relative URL, instead of full URL in the "Static Page Directory URL")
if (($f !~ /http/)&& ($f !~ /$CConfig{'htmlfile_path'}/)&& ($iuserelativeurls==1)){ #relative path
my $urlmain = 'http://'.($ENV{'HTTP_HOST'}?$ENV{'HTTP_HOST'} : $ENV{'SERVER_NAME'}).($ENV{'SERVER_PORT'} != 80 && $ENV{'HTTP_HOST'} !~ /:/ ? ":$ENV{'SERVER_PORT'}" : '');
$f = qq~$urlmain/$f~;
}#end if relative path
return $f;
}#end if profile enabled
else { return "profile $prof is disabled";}
} #end maURL sub

#========================
# end finding the URLs
#========================


# Set up and begin an RSS File profile
$Subs{'RSSFile_Initialize'} = <<'END_SUB';
sub RSSFile_Initialize {
my ($addon, $i, $fh) = @_;
my $set = $newsprofiles{$i};
unless ($set->{'channeltitle'} && $set->{'channeltitlelink'} && $set->{'channeldesc'} &&
$set->{'channellang'} && $set->{'itemtitle'} && $set->{'itemlink'}) {
$addon->minorError("RSS File profile $i is not fully configured. Please configure it via Edit News Profiles.");
}
print $fh q~<?xml version="1.0"?>

<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">
<channel>
~;
print $fh '<title>' . substr($set->{'channeltitle'},0,100) . '</title>';
print $fh '<link>' . substr($set->{'channeltitlelink'},0,500) . '</link>';
if ($set->{'channeldesc'}) {
print $fh '<description>' . substr($set->{'channeldesc'},0,500) . '</description>';
}
print $fh '<language>' . substr($set->{'channellang'}, 0, 500) . '</language>';
if ($set->{'pubdate'}) {
print $fh '<pubDate>'.substr(HTMLstrip($set->{'pubdate'}), 0, 100) . "</pubDate>";

}
#===== date/time
my @Monthsmall = (q~Jan~, q~Feb~, q~Mar~, q~Apr~, q~May~, q~Jun~, q~Jul~, q~Aug~, q~Sep~, q~Oct~, q~Nov~, q~Dec~);
my $difftime=0; # difference [hours] local time-server time
my ($sec,$min,$hour,$mday,$mon,$year,$wday)=(localtim e(time + (3600*$difftime)))[0..6];
$year += 1900; my $mon_ok=$mon+1;
# format rfc822, i.e. 02 Oct 2002 13:00:00 GMT
# time zone alternatives: "UT" / "GMT"
# ; Universal Time
# ; North American : UT
# / "EST" / "EDT" ; Eastern: - 5/ - 4
# / "CST" / "CDT" ; Central: - 6/ - 5
# / "MST" / "MDT" ; Mountain: - 7/ - 6
# / "PST" / "PDT" ; Pacific: - 8/ - 7
my $timezone="GMT";
my $date_now = sprintf ("%0.2d $Monthsmall[$mon] $year %0.2d:%0.2d:%0.2d $timezone", $mday, $hour, $min, $sec);
print $fh '<lastBuildDate>'.substr(HTMLstrip($date_now), 0, 100) . "</lastBuildDate>\n";

if ($set->{'imageurl'}) {
print $fh '<image><title>' . substr($set->{'imagealt'},0,100) . '</title>';
print $fh '<url>' . substr($set->{'imageurl'},0,500) . '</url>';
print $fh '<link>' . substr($set->{'imagelink'},0,500) . '</link>';
print $fh '<width>' . $set->{'imagewidth'} . '</width>';
print $fh '<height>' . $set->{'imageheight'}. '</height>';
print $fh '<description>' . substr($set->{'imagedesc'},0,100) . '</description>' if $set->{'imagedesc'};
print $fh "</image>\n";
}

NeedFile('cradmin.pl');

eval StyletoPerl('RSSFileStyle_' . $i . '_title', $set->{'itemtitle'});
$addon->fatalError("Syntax error in item title for profile $i. Error: $@") if $@;
eval StyletoPerl('RSSFileStyle_' . $i . '_link', $set->{'itemlink'});
$addon->fatalError("Syntax error in item link for profile $i. Error: $@") if $@;
if ($set->{'itemdesc'}) {
eval StyletoPerl('RSSFileStyle_' . $i . '_desc', $set->{'itemdesc'});
$addon->fatalError("Syntax error in item description for profile $i. Error: $@") if $@;
}
}
END_SUB


1;

__END__

=head1 RSS File Advanced


=head2 BASIC USAGE

Go to Edit Profiles, and create a new profile of type RSS File. (This option should be available after having enabled this addon.) Configure it, enable it, then build news.

=head2 CONFIGURATION & USAGE

All RSS File settings are documented on the Edit Profile page. Please see that page for information on the various configuration options available.

RSS files are the standard format for exchanging headlines between sites, and several sites support them. Some popular ones include L<http://newsisfree.com/>, L<http://www.blogspace.com/>, L<http://my.netscape.com/>, L<http://www.userland.com/>.

This addon generates (or should generate) valid RSS 0.91 files, but not all features are supported. The full specification is available at http://my.netscape.com/publish/ . A list of unimplemented features and other miscellaneous information follows:

=over 4

=item *

The RSS format supports multiple character sets, but this addon always uses the default (UTF-8). The Advanced version also adds support for Latin-1 encoding (accented characters are now welcome!).

=item *

RSS is an XML format, and files should generally have an .xml extension.

=item *

HTML is B<not> permitted inside RSS files. It is automatically stripped from subjects and descriptions by this addon.

=item *

The following features aren't implemented: forms/text boxes inside the channel, PICS ratings, and all features listed in the reference as "Ignored by Netcenter" (copyright, publication date, skipping days, etc.).

=back


can anyone explain that one... i can't...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 11-17-05, 06:34 PM
gnznroses gnznroses is offline
Newbie Coder
 
Join Date: Oct 2005
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
this is utterly retarded. i honestly think perl just randomly does crap and doesn't follow it's own rules. it's the only explination...


i copy/pasted the code form lastbuilddate and took out any other checks and code done to pubdate, and it still doesn't work. i made the following changes:



$rss_advancedpubdate = sprintf ("%0.2d $Monthsmall[$mon] $year %0.2d:%0.2d:%0.2d $timezone", $mday, $hour, $min, $sec);



# 'pubdate' => "$rss_advancedpubdate",



# if ($set->{'pubdate'}) {
print $fh '<pubDate>'. substr(HTMLstrip($rss_advancedpubdate), 0, 100) . "</pubDate>\n";
# print $fh '<pubDate>'.substr(HTMLstrip($set->{'pubdate'}), 0, 100) . "</pubDate>";


and it simply prints out: <pubDate /> with no date at all...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 11-25-05, 02:36 AM
Chas Chas is offline
Coding Addict
 
Join Date: Oct 2003
Location: California
Posts: 359
Thanks: 0
Thanked 0 Times in 0 Posts
I looked that code over real quick but didn't see anything glaringly wrong. Try adding some print/debug statements along the way and print the dates to your error log and see what you get. My guess is that something is overriding what you set the date to or you're setting it on the wrong variable.

~Charlie
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 11-25-05, 02:08 PM
gnznroses gnznroses is offline
Newbie Coder
 
Join Date: Oct 2005
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
thanks. hopefully i can just find a new script that does the same thing, cause nobody i've talked to on other sites can explain the problem either. it's really strange...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 11-28-05, 02:44 PM
Chas Chas is offline
Coding Addict
 
Join Date: Oct 2003
Location: California
Posts: 359
Thanks: 0
Thanked 0 Times in 0 Posts
Is this an application that you can e-mail to me? If so, I can step through it in a debugger and see exactly what's happening.

~Charlie
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Execute a perl script from another perl script. jkarimi Perl 3 09-07-05 12:42 AM
Avoid chaging the path to perl (shebang) on every upload to server uniqueuser Perl 2 04-19-05 03:27 PM
converting perl script to php help!! macruddace Perl 1 04-14-05 03:38 PM
Perl FormMail Problem ennanguyen2002 Perl 2 03-09-05 05:47 PM
Perl coder needed XGamingZone Perl 1 09-17-04 08:19 AM


All times are GMT -5. The time now is 12:14 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.