Learn R Programming

automerge (version 0.3.0)

am_change_time: Get the timestamp of a change

Description

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)

Value

A POSIXct timestamp

Arguments

change

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

Examples

Run this code
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]])

am_close(doc)

Run the code above in your browser using DataLab