3
This command has 2 modes of operation. If no <b>date</b> argument is
4
supplied, then the current timestamp for the raster map is printed. If
5
a date argument is specified, then the timestamp for the raster map is
6
set to the specified date(s). See examples below.
10
Strings containing spaces should be quoted. For specifying a range of
11
time, the two timestamps should be separated by a forward slash. To
12
remove the timestamp from a raster map, use <b>date=none</b>.
14
<h2>TIMESTAMP FORMAT</h2>
16
The timestamp values must use the format as described in the <em>GRASS
17
Datetime Library</em>. The source tree for this library should have a
18
description of the format. For convience, the formats are reproduced
21
<p>There are two types of datetime values:
24
<li><em>absolute</em> and
25
<li><em>relative</em>.
28
Absolute values specify exact dates and/or times. Relative values
29
specify a span of time.
33
The general format for absolute values is:
35
<div class="code"><pre>
36
day month year [bc] hour:minute:seconds timezone
39
month is jan,feb,...,dec
41
[bc] if present, indicates dates is BC
42
hour is 0-23 (24 hour clock)
44
second is 0-59.9999 (fractions of second allowed)
45
timezone is +hhmm or -hhmm (eg, -0600)
48
Some parts can be missing, for example
50
<div class="code"><pre>
54
15 jan 1994 [bc] 10 [+0000]
55
15 jan 1994 [bc] 10:00 [+0100]
56
15 jan 1994 [bc] 10:00:23.34 [-0500]
61
There are two types of relative datetime values, year-month and
62
day-second. The formats are:
64
<div class="code"><pre>
66
[-] # days # hours # minutes # seconds
69
The words years, months, days, hours, minutes, seconds are literal
70
words, and the # are the numeric values. Examples:
72
<div class="code"><pre>
77
15 hours 25 minutes 35.34 seconds
79
1000 hours 35.34 seconds
82
The following are <i>illegal</i> because it mixes year-month and
83
day-second (because the number of days in a month or in a year vary):
85
<div class="code"><pre>
92
Prints the timestamp for the "soils" raster map. If there is no
93
timestamp for "soils", nothing is printed. If there is a timestamp,
94
one or two time strings are printed, depending on if the timestamp for
95
the map consists of a single date or two dates (ie start and end
98
<div class="code"><pre>
102
Sets the timestamp for "soils" to the single date "15 sep 1987".
104
<div class="code"><pre>
105
r.timestamp map=soils date='15 sep 1987'
108
Sets the timestamp for "soils" to have the start date "15 sep 1987"
109
and the end date "20 feb 1988".
111
<div class="code"><pre>
112
r.timestamp map=soils date='15 sep 1987/20 feb 1988'
115
Removes the timestamp for the "soils" raster map.
117
<div class="code"><pre>
118
r.timestamp map=soils date=none
122
Spaces in the timestamp value are required.
127
<a href="r.info.html">r.info</a>
132
Michael Shapiro, U.S.Army Construction Engineering Research Laboratory
134
<p><i>Last changed: $Date: 2012-01-28 12:56:15 -0800 (Sat, 28 Jan 2012) $</i>