curl / Mailing Lists / curl-users / Single Mail

curl-users

Re: Query about correcting for DST with curl

From: Tim <tim.dvs_at_m69n.com>
Date: Fri, 11 Nov 2016 04:26:28 -0000

Hi Daniel

Thank you very much for your reply.

>Are you talking about using the -R, --remote-time option ?
Yes. The file time is off by one hour. I have tried it with both Apache and
Abbys Web Server and the same thing happens. I should add that the file I am
downloading for test purposes was last modified last Summer.

The clocks on both the server and client computers are both set correctly.
However, I don't see that it would make a difference if this was not the
case because the issue is with file timestamps, not the computer's clock.
Both the server and client computers are running Windows operating systems.

To be honest, I find this baffling, do you have any idea why both Apache and
Abbys would adjust the timestamp of the file by an hour when reporting it to
curl? Do you think that you can get curl to detect whenever this is
happening and adjust the timestamp of the downloaded file back to its
original value again?

Thank you very much.

Kind regards

Tim

----- Original Message -----
From: "Daniel Stenberg" <daniel_at_haxx.se>
To: "the curl tool" <curl-users_at_cool.haxx.se>
Sent: Thursday, November 10, 2016 10:31 PM
Subject: Re: Query about correcting for DST with curl

On Thu, 10 Nov 2016, Tim wrote:

> When I use curl to download a file from a website, the timestamp is out by
> an hour.

Are you talking about using the -R, --remote-time option ?

> I think this is because of Daylight Saving Time. Do any of you know how I
> can correct this?

curl can only parse and use the document time provided by the server. If
that
is off, curl has no way to offset it. Maybe we should.

> Please note that I have access to both the web server and the client
> computer so I can make any necessary changes at either end.

So is the server time off ?

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-users
FAQ:        https://curl.haxx.se/docs/faq.html
Etiquette:  https://curl.haxx.se/mail/etiquette.html
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-users
FAQ:        https://curl.haxx.se/docs/faq.html
Etiquette:  https://curl.haxx.se/mail/etiquette.html
Received on 2016-11-11