// Aligned on 8-byte boundaries on systems where time_t is 8 bytes and int
// is 4 bytes, aka modern linux on x86_64
- time_t last_modified{}; //!< For autocalculating SOA serial numbers - the backend needs to fill this in
+ time_t last_modified{}; //!< Timestamp of last update, if known by the backend
uint32_t ttl{}; //!< Time To Live of this record
uint32_t signttl{}; //!< If non-zero, use this TTL as original TTL in the RRSIG
while (rit != records.end() && rit->qname == current_qname && rit->qtype == current_qtype) {
ttl = min(ttl, rit->ttl);
- rrset_records.push_back(Json::object{
+ auto object = Json::object{
{"disabled", rit->disabled},
- {"content", makeApiRecordContent(rit->qtype, rit->content)}});
+ {"content", makeApiRecordContent(rit->qtype, rit->content)}};
+ if (rit->last_modified != 0) {
+ object["modified_at"] = (double)rit->last_modified;
+ }
+ rrset_records.push_back(object);
rit++;
}
while (cit != comments.end() && cit->qname == current_qname && cit->qtype == current_qtype) {
{"ttl", (double)resourceRecord.ttl},
{"disabled", resourceRecord.disabled},
{"content", makeApiRecordContent(resourceRecord.qtype, resourceRecord.content)}};
+ if (resourceRecord.last_modified != 0) {
+ object["modified_at"] = (double)resourceRecord.last_modified;
+ }
val = zoneIdZone.find(resourceRecord.domain_id);
if (val != zoneIdZone.end()) {