Does r.timestamp work for anybody?

Hello, everyone -

I've tried time-stamping a raster file with r.timestamp, and all it ever
does is write an empty file named "timestamp" to the /cell_misc/<filename>/
directory. Some of my efforts to make r.timestamp work are described in the
tests below. What am I doing wrong?

1.) When I try reading the empty timestamp file with the command
r.timestamp map=<filename>
, it prints blanks to the screen, as one might expect from an empty
timestamp file.

2.) When I create my own timestamp file with a text editor, containing the
single ASCII line
16 may 2000 12:57
and try reading it as in Test 1, r.timestamp still prints blanks to the
screen.

3.) Curiously, r.timestamp accepts the above format from the timestamp
file, but not from the command line. When I try time-stamping a file with
the command
r.timestamp map=<filename> date='16 may 2000 12:57'
I get the error message "invalid timestamp specified for raster map
<filename> ..." and a 0-byte timestamp file. But the command
r.timestamp map=<filename> date='2000 may 16 12:57'
proceeds without error messages to write a 1-byte timestamp file. It's no
more useful than the 0-byte file.

4.) Equally curious, the format acceptable from the command line is not
acceptable from the timestamp file. Creating the timestamp file
2000 may 16 12:57
with the text editor and trying to read it as in Tests 1 and 2, r.timestamp
produces the error message "invalid timestamp file for raster map <filename>
...".

I'll confirm it's broken. I get the same 1 byte file, which has a single
newline.

--
¶ One·should·only·use·the·ASCII·character­set·when·compos­

» ing·email·messages.


Hi,

good news:
r.timestamp was recently fixed by Bill Hughes and Bill Brown.
I will send the small patch later. The new version is
in CVS (the src/libes/datetime/copy.c needed a fix)

Markus Neteler

On Wed, May 17, 2000 at 02:08:47PM -0700, Pelizzari, Michael wrote:

Hello, everyone -

I've tried time-stamping a raster file with r.timestamp, and all it ever
does is write an empty file named "timestamp" to the /cell_misc/<filename>/
directory. Some of my efforts to make r.timestamp work are described in the
tests below. What am I doing wrong?

1.) When I try reading the empty timestamp file with the command
r.timestamp map=<filename>
, it prints blanks to the screen, as one might expect from an empty
timestamp file.

2.) When I create my own timestamp file with a text editor, containing the
single ASCII line
16 may 2000 12:57
and try reading it as in Test 1, r.timestamp still prints blanks to the
screen.

3.) Curiously, r.timestamp accepts the above format from the timestamp
file, but not from the command line. When I try time-stamping a file with
the command
r.timestamp map=<filename> date='16 may 2000 12:57'
I get the error message "invalid timestamp specified for raster map
<filename> ..." and a 0-byte timestamp file. But the command
r.timestamp map=<filename> date='2000 may 16 12:57'
proceeds without error messages to write a 1-byte timestamp file. It's no
more useful than the 0-byte file.

4.) Equally curious, the format acceptable from the command line is not
acceptable from the timestamp file. Creating the timestamp file
2000 may 16 12:57
with the text editor and trying to read it as in Tests 1 and 2, r.timestamp
produces the error message "invalid timestamp file for raster map <filename>
...".

--
Dipl.-Geogr. Markus Neteler * University of Hannover
Institute of Physical Geography and Landscape Ecology
Schneiderberg 50 * D-30167 Hannover * Germany
Tel: ++49-(0)511-762-4494 Fax: -3984

Hi again,

here the patch for the datetime lib from Bill Brown:

src/libes/datetime > cvs diff -r1.1 copy.c

RCS file: /grassrepository/grass/src/libes/datetime/copy.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -r1.1 -r1.2
4c4
< copy (char *src, char *dst, int n)
---

copy (char *dst, char *src, int n)

11c11
< datetime_copy (DateTime *src, DateTime *dst)
---

datetime_copy (DateTime *dst, DateTime *src)

13c13
< copy ((char *)src, (char *)dst, sizeof(DateTime));
---

    copy ((char *)dst, (char *)src, sizeof(DateTime));

Then
- recompile datetime lib
- recompile r.timestamp

Enjoy.

Regards

Markus Neteler