Commit Graph

4 Commits

Author SHA1 Message Date
Johannes Sixt
04d1197343 Move the utime() wrapper from test-chmtime.c to mingw.c.
The recent commit f746bae84e uses utime() to
adjust time stamps of pack files. We better make sure that we have an
implementation of utime that sets time stamps in a fashion that works with
our stat() implementation. (The system's utime() implemenation has issues
with daylight saving time changes.)

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
2008-03-18 09:18:53 +01:00
Steffen Prohaska
f593be0480 test-chmtime.c: Cast HANDLE to fix warning
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
2007-11-18 20:36:21 +01:00
Johannes Sixt
8a7bc5f55c MinGW: Add a custom implementation for utime().
There seems to be a problem with Microsoft's utime() implementation.
With this implementation we ensure that the files times written are UTC.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
2007-09-22 20:53:38 +02:00
Eric Wong
17e4836875 Add test-chmtime: a utility to change mtime on files
This is intended to be a portable replacement for our usage
of date(1), touch(1), and Perl one-liners in tests.

Usage: test-chtime (+|=|-|=+|=-)<seconds> <file>..."

  '+' increments the mtime on the files by <seconds>
  '-' decrements the mtime on the files by <seconds>
  '=' sets the mtime on the file to exactly <seconds>
  '=+' and '=-' sets the mtime on the file to <seconds> after or
      before the current time.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-25 11:09:56 -08:00