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, or datetime1/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. πŸ•°οΈ

πŸ’– 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 date argument, it just prints the current timestamp for the raster map. No notes, just receipts.
  • If you do specify a date argument, 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’, not 15 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