Skip to content

Returns the timestamp recorded when the change was committed. Note that timestamps are set by the committing peer and may not be accurate if the peer's clock is wrong.

Usage

am_change_time(change)

Arguments

change

An am_change object (from am_get_changes() or am_change_from_bytes())

Value

A POSIXct timestamp

Examples

doc <- am_create()
am_put(doc, AM_ROOT, "key", "value")
am_commit(doc, "Add key", Sys.time())

history <- am_get_changes(doc)
am_change_time(history[[1]])
#> [1] "2026-02-26 11:28:12 UTC"

am_close(doc)