r.timestamp.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <h2>DESCRIPTION</h2>
  2. This command has 2 modes of operation. If no <b>date</b> argument is
  3. supplied, then the current timestamp for the raster map is printed. If
  4. a date argument is specified, then the timestamp for the raster map is
  5. set to the specified date(s). See examples below.
  6. <h2>NOTES</h2>
  7. Strings containing spaces should be quoted. For specifying a range of
  8. time, the two timestamps should be separated by a forward slash. To
  9. remove the timestamp from a raster map, use <b>date=none</b>.
  10. <h2>TIMESTAMP FORMAT</h2>
  11. The timestamp values must use the format as described in the <em>GRASS
  12. Datetime Library</em>. The source tree for this library should have a
  13. description of the format. For convenience, the formats are reproduced
  14. here:
  15. <p>There are two types of datetime values:
  16. <ul>
  17. <li><em>absolute</em> and
  18. <li><em>relative</em>.
  19. </ul>
  20. Absolute values specify exact dates and/or times. Relative values
  21. specify a span of time.
  22. <h3>Absolute</h3>
  23. The general format for absolute values is:
  24. <div class="code"><pre>
  25. day month year [bc] hour:minute:seconds timezone
  26. day is 1-31
  27. month is jan,feb,...,dec
  28. year is 4 digit year
  29. [bc] if present, indicates dates is BC
  30. hour is 0-23 (24 hour clock)
  31. minute is 0-59
  32. second is 0-59.9999 (fractions of second allowed)
  33. timezone is +hhmm or -hhmm (eg, -0600)
  34. </pre></div>
  35. Some parts can be missing, for example
  36. <div class="code"><pre>
  37. 1994 [bc]
  38. Jan 1994 [bc]
  39. 15 jan 1000 [bc]
  40. 15 jan 1994 [bc] 10 [+0000]
  41. 15 jan 1994 [bc] 10:00 [+0100]
  42. 15 jan 1994 [bc] 10:00:23.34 [-0500]
  43. </pre></div>
  44. <h3>Relative</h3>
  45. There are two types of relative datetime values, year-month and
  46. day-second. The formats are:
  47. <div class="code"><pre>
  48. [-] # years # months
  49. [-] # days # hours # minutes # seconds
  50. </pre></div>
  51. The words years, months, days, hours, minutes, seconds are literal
  52. words, and the # are the numeric values. Examples:
  53. <div class="code"><pre>
  54. 2 years
  55. 5 months
  56. 2 years 5 months
  57. 100 days
  58. 15 hours 25 minutes 35.34 seconds
  59. 100 days 25 minutes
  60. 1000 hours 35.34 seconds
  61. </pre></div>
  62. The following are <i>illegal</i> because it mixes year-month and
  63. day-second (because the number of days in a month or in a year vary):
  64. <div class="code"><pre>
  65. 3 months 15 days
  66. 3 years 10 days
  67. </pre></div>
  68. <h2>EXAMPLES</h2>
  69. Prints the timestamp for the "soils" raster map. If there is no
  70. timestamp for "soils", nothing is printed. If there is a timestamp,
  71. one or two time strings are printed, depending on if the timestamp for
  72. the map consists of a single date or two dates (ie start and end
  73. dates).
  74. <div class="code"><pre>
  75. r.timestamp map=soils
  76. </pre></div>
  77. Sets the timestamp for "soils" to the single date "15 sep 1987".
  78. <div class="code"><pre>
  79. r.timestamp map=soils date='15 sep 1987'
  80. </pre></div>
  81. Sets the timestamp for "soils" to have the start date "15 sep 1987"
  82. and the end date "20 feb 1988".
  83. <div class="code"><pre>
  84. r.timestamp map=soils date='15 sep 1987/20 feb 1988'
  85. </pre></div>
  86. Sets the timestamp for "soils" to have the start date "18 feb 2005
  87. 10:30:00" and the end date "20 jul 2007 20:30:00".
  88. <div class="code"><pre>
  89. r.timestamp map=soils date='18 feb 2005 10:30:00/20 jul 2007 20:30:00'
  90. </pre></div>
  91. Removes the timestamp for the "soils" raster map.
  92. <div class="code"><pre>
  93. r.timestamp map=soils date=none
  94. </pre></div>
  95. <h2>KNOWN ISSUES</h2>
  96. Spaces in the timestamp value are required.
  97. <h2>SEE ALSO</h2>
  98. <em>
  99. <a href="r.info.html">r.info</a>,
  100. <a href="r3.timestamp.html">r3.timestamp</a>,
  101. <a href="v.timestamp.html">v.timestamp</a>
  102. </em>
  103. <h2>AUTHOR</h2>
  104. Michael Shapiro, U.S.Army Construction Engineering Research Laboratory
  105. <p><i>Last changed: $Date$</i>