#150 Bad date parsing for meta date tag

closed-out-of-date
htdig (103)
5
2003-06-07
2003-01-22
Bill Meier
No

I'm using the meta data tag. I can see my date going in
correctly using htdig -vv -- but its not being displayed in
the search summary.

I used "2003-01-22" and no date is set. Code inspection
in Retriever.cc parsedcdate reveals that it does NOT
allow a dash after the year part (it only allows spaces).
However the check for month allows dash or spaces.

Fix: At the end of year parsing, replace

while (isspace(*s))
s++;

with

while (*s == '-' || isspace(*s))
s++;

I can't decide if I should fix my htdig or change my dates
to be "2003 01 22" which works fine....

A related issue is the output of the modified date... I
suspect the meta date is GMT (although you can't
specify that), and the modified date output from search
is local time. I have been using dates with the day as 1,
like :1996-04-01 (well with spaces, but... ;-) and it is
output as
3/31/96
the day BEFORE the date in the meta tag. As another
workaround I put the date in as

"1996-04-01 12:00:00"

which when converted to a time zone still stays at 4/1/96

I guess I'll get email when there is some status update
on this?

Thanks!

Bill

Discussion

  • Bill Meier

    Bill Meier - 2003-01-22

    Logged In: YES
    user_id=217563

    I'm sorry, the reason for this is that I'm trying to use the
    start/end year/month/day parameters in my search.

    These are static files generated from a database, and I rebuild
    them from time to time, so the file modification time does not
    reflect the time the page was really created. One of the fields
    in the DB is date, so I figured I could output the meta date tag
    and it would work fine.

    If I do but spaces in the date, and add 12:00:00 the filter
    based on date from those config parameters works fine.

     
  • Lachlan Andrew

    Lachlan Andrew - 2003-01-24
    • assigned_to: nobody --> lha
     
  • Lachlan Andrew

    Lachlan Andrew - 2003-01-24

    Logged In: YES
    user_id=663373

    ht://Dig 3.2.0b4 has rewritten the date handling since
    3.1.6. Could you please try the latest snapshot, and report
    back if the space/dash problem still exists?

     
  • Lachlan Andrew

    Lachlan Andrew - 2003-06-07
    • status: open --> closed-out-of-date
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks