membender has asked for the wisdom of the Perl Monks concerning the following question:

When I request a newsletter from yahoo around midnight here in CA, I get one date (Eastern) when I request the page in a perl script and another (Pacific) when I just look at it in a browser (Firefox, whose UA string I use in the script). Anyone out there know why (&or how to correct)? I'm guessing Firefox sends along timezone info in the request header, but haven't been able to confirm this or find out how to do it in perl. Related: is there a way in firefox to dump a full request with headers to the screen rather than sending it along? Thanks.
  • Comment on Different date returned in FF source, perl result string

Replies are listed 'Best First'.
Re: Different date returned in FF source, perl result string
by andyford (Curate) on Feb 20, 2007 at 23:33 UTC
Re: Different date returned in FF source, perl result string
by jasonk (Parson) on Feb 21, 2007 at 13:43 UTC

    I would guess you are logged into yahoo in firefox, and not logging in from your script (or not logging in as the same user), so from the script you get a default timezone, instead of the timezone you specified in your yahoo profile.


    We're not surrounded, we're in a target-rich environment!
Re: Different date returned in FF source, perl result string
by ww (Archbishop) on Feb 21, 2007 at 13:44 UTC
    Almost a WAG, but re your first question here is return_question which may be worth checking:

    The difference may be rooted in how you're handling times in the script. Are you, for example, using any construct that might be converting (or, "failing to convert") some dynamically created element in the newsletter to localtime?

    As an aside, any html "latest update" field would be pretty worthless if dynamic in the sense of using the time of the current request as the time of the latest update; in fact, one might regard that kind of specious date as damned near fraud (I do! YMMV). Yes, there are quite a lot of entities that do just that, but widespread practice doesn't make it legit, IMO.

    Just for clarity, which I seem to be having difficulty with just now) I have no problem with a "latest update" that's tied to content change -- for example, the latest revision of specific content in the db used as source of the page's content, or the last time the hmtl content was actually changed).