public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Frank Farance" <frank@farance.com>
To: cygwin@cygwin.com
Subject: Problem with daylight saving time, off by one hour
Date: Tue, 28 Feb 2012 15:26:00 -0000	[thread overview]
Message-ID: <63813.141.155.196.239.1330441201.squirrel@mail.farance.com> (raw)

I've had Cygwin running on a Windows XP workstation for years using rsync
as my primary backup tool for my data files.  The workstation just crashed
with a hard drive failure, I've replaced the drive and so on.  Initially,
I was recovering most of the files with WinSCP (5.0.5) from the backup
server.

While this was going on, I was working on the script to recover the files
(essentially swapping the arguments to the rsync script I used for
backup).  As I was testing this on already-recovered files (via WinSCP) I
noticed that some needed to be transferred again.  To make a long story
short, rsync (via Cygwin) has a different sense of time than WinSCP or
Windows for files modified during summer time.

For example, the file 100_1164.JPG copied by WinSCP reports a timestamp of
2005-09-01 10:46, which is consistent with the EXIF data in the file, and
consistent with Windows XP's report of the time 10:46.

Meanwhile, rsync belives the file is different and looks to update it. 
Furthermore, ls reports the wrong time (via --full-time) as 11:46 -0400. 
Yes, ls has the right timezone offset (it was summer time in NYC on
2005-09-01), but the time itself is wrong.  Even when I precede the
command with TZ=UTC0, the UTC time reported by ls is wrong (says 15:46,
should be 14:46).

I've read previous posts on this problem in a variety of places and they
mostly suggest that one use "--modify-window=3601" or something like that
to make timestamps fuzzy.  In my opinion, that is the wrong solution
because the rsync client (i.e., the files being backed up) will record the
wrong time on the rsync server because the rsync client itself has the
wrong sense of time.  And, as I pointed out above, the ls command has the
same problem, too.

My sense is the implementation of the stat() system call is wrong because
even with the TZ set to UTC, it still reports the wrong time.

Now this all used to work nicely with Cygwin before.  I don't know exactly
the prior version of Cygwin, but I had downloaded it in 2006-11.

My present version of Cygwin, which was downloaded yesterday is: DLL
version: 1.7.11.  The current version of rsync is 3.0.9-1.

Is this fixed by a new release or a different configuration?  Please don't
respond with "windows is stupid" because (1) it's cygwin's job to figure
out these quirks with Windows, (2) other tools get this right (e.g.,
WinSCP), and (3) it used to work right on old versions of cygwin (I've
been using cywin rsync for at least a dozen years).  I have several
million files to back up (with integrity), so I need an rsync-like
solution.

Thank you, in advance, for your help and insight.

Frank Farance



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

             reply	other threads:[~2012-02-28 15:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-28 15:26 Frank Farance [this message]
2012-02-28 16:20 ` Corinna Vinschen
2012-02-28 17:24   ` Frank Farance
2012-02-28 18:21     ` Corinna Vinschen
2012-02-28 19:20       ` Frank Farance
2012-02-28 19:28         ` Corinna Vinschen
2012-02-28 20:23           ` Earnie Boyd
2012-02-28 21:40             ` Frank Farance
2012-02-29 13:07               ` Earnie Boyd
2012-02-29 16:06                 ` Frank Farance
2012-02-29 12:53 G.W. Haywood
2012-02-29 14:55 ` Corinna Vinschen
2012-02-29 15:22   ` Frank Farance

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63813.141.155.196.239.1330441201.squirrel@mail.farance.com \
    --to=frank@farance.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).