r.timestamp(1grass)
β¨ r.timestamp β¨
okay bestie, gather round, because we're talking about r.timestamp β it's a GRASS User's Manual page (yes, we're in the GRASS manual, welcome π), and honestly? It's giving tiny tool, huge main character energy.
πΈ NAME πΈ
r.timestamp β modifies a timestamp for a raster map. π
Like, it prints, adds, or removes a timestamp for a raster map. That's the whole gig. Iconic, lowkey.
π KEYWORDS π
raster, metadata, timestamp, time
π¦ SYNOPSIS π¦
r.timestamp
r.timestamp --help
r.timestamp map=name [date=timestamp] [--help] [--verbose]
[--quiet] [--ui]
β Flags
--helpβ prints the usage summary. Your bestie when you're lost fr.--verboseβ verbose module output. It's gonna yap (affectionate).--quietβ quiet module output. Not a peep. π€«--uiβ forces launching the GUI dialog. Point-and-click girlies, this one's for you.
π Parameters
map=name[required] β the name of the raster map. Required, so don't forget it, girl.date=timestampβ a datetime, ordatetime1/datetime2, or the literal stringβnoneβif you want to remove the timestamp.- Format: like
β15 jan 1994βfor absolute, orβ2 yearsβfor relative. π°οΈ
- Format: like
π DESCRIPTION π
So r.timestamp has two modes of operation, and the way it decides is truly so simple:
- If you don't hand it a
dateargument, it just prints the current timestamp for the raster map. No notes, just receipts. - If you do specify a
dateargument, then the timestamp for the raster map gets set to the date(s) you gave it. Periodt.
The examples below show you everything, so keep scrolling, bestie. π
π NOTES π
- Strings with spaces in them? Quote them.
β15 jan 1994β, not15 jan 1994, or the shell will eat it alive. π - Want a range of time? Separate the two timestamps with a forward slash (
/). Like a little duet. π«Ά - Want the timestamp gone? Use
date=none. Bye bye, timestamp, we hardly knew ye. π
π§ TIMESTAMP FORMAT π§
The timestamp values have to use the format described in the GRASS Datetime Library. The source tree for that library should have a description of the format. But because we're nice, the formats are reproduced right here for your convenience. π
So there are two types of datetime values:
- absolute, and
- relative.
Absolute values specify exact dates and/or times. Relative values specify a span of time. Vibe check: one is a pin on a map, the other is a duration. πβ³
π Absolute
The general format for absolute values is:
day month year [bc] hour:minute:seconds timezone
day is 1-31
month is jan,feb,...,dec
year is 4 digit year
[bc] if present, indicates dates is BC
hour is 0-23 (24 hour clock)
minute is 0-59
second is 0-59.9999 (fractions of second allowed)
timezone is +hhmm or -hhmm (eg, -0600)
Some parts can be missing, for example:
1994 [bc]
Jan 1994 [bc]
15 jan 1000 [bc]
15 jan 1994 [bc] 10 [+0000]
15 jan 1994 [bc] 10:00 [+0100]
15 jan 1994 [bc] 10:00:23.34 [-0500]
See? You can leave bits out and it still slays. β¨
π Relative
There are two types of relative datetime values: year-month and day-second. The formats are:
[-] # years # months
[-] # days # hours # minutes # seconds
The words years, months, days, hours, minutes, seconds are literal words, and the # are the numeric values. Examples:
2 years
5 months
2 years 5 months
100 days
15 hours 25 minutes 35.34 seconds
100 days 25 minutes
1000 hours 35.34 seconds
And now the part that trips people up β the following are illegal because they mix year-month and day-second (because the number of days in a month or in a year vary):
3 months 15 days
3 years 10 days
β οΈ Do NOT do this. Months and years are not a fixed number of days, so the library is not gonna pretend they are. Mixing them is invalid, no cap.
π EXAMPLES π
Prints the timestamp for the "soils" raster map. If there is no timestamp for "soils", nothing is printed. If there is a timestamp, one or two time strings are printed, depending on if the timestamp for the map consists of a single date or two dates (ie start and end dates).
r.timestamp map=soils
Sets the timestamp for "soils" to the single date "15 sep 1987".
r.timestamp map=soils date=β15 sep 1987β
Sets the timestamp for "soils" to have the start date "15 sep 1987" and the end date "20 feb 1988".
r.timestamp map=soils date=β15 sep 1987/20 feb 1988β
Sets the timestamp for "soils" to have the start date "18 feb 2005 10:30:00" and the end date "20 jul 2007 20:30:00".
r.timestamp map=soils date=β18 feb 2005 10:30:00/20 jul 2007 20:30:00β
Removes the timestamp for the "soils" raster map.
r.timestamp map=soils date=none
π KNOWN ISSUES π
Spaces in the timestamp value are required. Yeah, required. Don't try to be clever and drop them, bestie, it will not go well. π
π SEE ALSO π
r.info, r3.timestamp, v.timestamp
π AUTHOR π
Michael Shapiro, U.S.Army Construction Engineering Research Laboratory
(An actual legend, honestly. We stan. π«Ά)
π SOURCE CODE π
Available at: r.timestamp source code (history)
Latest change: Friday Mar 07 07:39:48 2025 in commit: e1e37d87e78212dfcf4c97aaf32c54042adbd2b0
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual
and that's the whole page, bestie! π we're running GRASS 8.5.0 around here, this particular glow-up landed Friday Mar 07 07:39:48 2025 in commit e1e37d87e78212dfcf4c97aaf32c54042adbd2b0, and shoutout to the GRASS Development Team for the Β© 2003-2026. timestamp your rasters responsibly, mwah π
β¨π
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms