Contains the timestamps(a.k.a data_version
) of the OSM extract if the header is set.
tar tvf nevada-latest.osrm.timestamp
-rw-rw-r-- 0/0 8 1970-01-01 08:00 osrm_fingerprint.meta
-rw-rw-r-- 0/0 8 1970-01-01 08:00 /common/timestamp.meta
-rw-rw-r-- 0/0 20 1970-01-01 08:00 /common/timestamp
Stores timestamp
(a.k.a data_version
) depends on osrm-extract -d xxx
. This information will be returned in data_version
of route response.
- No
-d
when runosrm-extract
: will be empty, nothing will be stored. osrm-extract -d osmosis
: stores thetimestamp
get from.osm.pbf
file, e.g.2019-01-24T21:15:02Z
.osrm-extract -d "user defined data version"
: stores the user defined data version string.
The timestamp
is a std::string
comes from osmosis
(get when parsing OSM headers in function ParseOSMData) or command line parameter -d xxx
directly, then simply write into .osrm.timestamp
file. Check codes in ParseOSMData.
// write .timestamp data file
std::string timestamp = header.get("osmosis_replication_timestamp");
if (config.data_version == "osmosis")
{
files::writeTimestamp(config.GetPath(".osrm.timestamp").string(), timestamp);
}
else
{
files::writeTimestamp(config.GetPath(".osrm.timestamp").string(), config.data_version);
}