{"id":981,"date":"2013-06-28T03:09:47","date_gmt":"2013-06-28T01:09:47","guid":{"rendered":"http:\/\/blogs.chrisse.se\/?p=981"},"modified":"2023-06-06T17:00:31","modified_gmt":"2023-06-06T15:00:31","slug":"the-constructed-attribute-modifytimestamp-always-whenchanged","status":"publish","type":"post","link":"https:\/\/blog.chrisse.se\/?p=981","title":{"rendered":"The constructed attribute modifyTimeStamp always == whenChanged?"},"content":{"rendered":"\n<p>So if you read up on modifyTimeStamp \u2013 for example here: <a href=\"http:\/\/blog.joeware.net\/2006\/10\/03\/655\/\">http:\/\/blog.joeware.net\/2006\/10\/03\/655\/<\/a> or at MSDN: <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/ms677125(v=vs.85).aspx\">http:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/ms677125(v=vs.85).aspx<\/a> &#8220;modifyTimeStamp&#8221; is a constructed attribute and as Joe points out it&#8217;s based on the &#8220;whenChanged&#8221; attribute and that assumption is right in 99,9% of all cases, BUT not always \u2013 So where is the exception?<\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\"><strong>The exceptional case<\/strong><\/span><\/p>\n\n\n\n<p>The exception is the DMD or the SubSchemaSubEntry &#8220;<span style=\"font-family: Arial; font-size: 8pt;\">CN=Aggregate,CN=Schema,CN=Configuration,DC=X<\/span>&#8220;<\/p>\n\n\n\n<p>Let&#8217;s have a look with LDP.exe:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"927\" height=\"531\" src=\"https:\/\/blog.chrisse.se\/wp-content\/uploads\/2023\/06\/image-36.png\" alt=\"\" class=\"wp-image-1060\" srcset=\"https:\/\/blog.chrisse.se\/wp-content\/uploads\/2023\/06\/image-36.png 927w, https:\/\/blog.chrisse.se\/wp-content\/uploads\/2023\/06\/image-36-300x172.png 300w, https:\/\/blog.chrisse.se\/wp-content\/uploads\/2023\/06\/image-36-768x440.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>So this clearly shows that &#8216;modifyTimeStamp&#8217; is NOT based on the &#8216;whenChanged&#8217; attribute for the subSchemaEntry.<\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\"><strong>How it really works<\/strong><\/span><\/p>\n\n\n\n<p>Let&#8217;s agree we have confirmed that, so to the next question, what is it based on? Well it&#8217;s based on the last time the in-memory schema cache of the particular DC was updated either during boot or by manually triggering the operational attribute &#8220;SchemaUpdateNow:1&#8221;<\/p>\n\n\n\n<p>So let&#8217;s try that?<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"563\" height=\"723\" src=\"https:\/\/blog.chrisse.se\/wp-content\/uploads\/2023\/06\/image-37.png\" alt=\"\" class=\"wp-image-1061\" srcset=\"https:\/\/blog.chrisse.se\/wp-content\/uploads\/2023\/06\/image-37.png 563w, https:\/\/blog.chrisse.se\/wp-content\/uploads\/2023\/06\/image-37-234x300.png 234w\" sizes=\"auto, (max-width: 563px) 100vw, 563px\" \/><\/figure>\n\n\n\n<p>So let&#8217;s have a look again:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"945\" height=\"447\" src=\"https:\/\/blog.chrisse.se\/wp-content\/uploads\/2023\/06\/image-38.png\" alt=\"\" class=\"wp-image-1063\" srcset=\"https:\/\/blog.chrisse.se\/wp-content\/uploads\/2023\/06\/image-38.png 945w, https:\/\/blog.chrisse.se\/wp-content\/uploads\/2023\/06\/image-38-300x142.png 300w, https:\/\/blog.chrisse.se\/wp-content\/uploads\/2023\/06\/image-38-768x363.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p><br>Yes \u2013 &#8220;modifyTimeStamp&#8221; now shows todays date: 2013-06-28 instead of previously 2013-06-21 <span style=\"font-family: Wingdings;\">J<\/span><\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\"><strong>Why it was implemented<br><\/strong><\/span><\/p>\n\n\n\n<p>So I guess now there is really one good question left, <span style=\"text-decoration: underline;\">why?<\/span><\/p>\n\n\n\n<p>The answer can be found if you read up on <a href=\"http:\/\/www.ietf.org\/rfc\/rfc2251.txt\" target=\"_blank\" rel=\"noopener\">RFC 2251<\/a> that says:<\/p>\n\n\n\n<p>&#8220;modifyTimestamp: the time this entry was last modified&#8221; \u2013 you can read further on MSDN where you can see what functionality defined in RFC 2551 Active Directory has implemented: <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/cc223231.aspx\">http:\/\/msdn.microsoft.com\/en-us\/library\/cc223231.aspx<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So if you read up on modifyTimeStamp \u2013 for example here: http:\/\/blog.joeware.net\/2006\/10\/03\/655\/ or at MSDN: http:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/ms677125(v=vs.85).aspx &#8220;modifyTimeStamp&#8221; is a constructed attribute and as Joe points out it&#8217;s based on the &#8220;whenChanged&#8221; attribute and that assumption is right in 99,9% of all cases, BUT not always \u2013 So where is the exception? The exceptional case The &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.chrisse.se\/?p=981\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;The constructed attribute modifyTimeStamp always == whenChanged?&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-981","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.chrisse.se\/index.php?rest_route=\/wp\/v2\/posts\/981","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.chrisse.se\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.chrisse.se\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.chrisse.se\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.chrisse.se\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=981"}],"version-history":[{"count":2,"href":"https:\/\/blog.chrisse.se\/index.php?rest_route=\/wp\/v2\/posts\/981\/revisions"}],"predecessor-version":[{"id":1064,"href":"https:\/\/blog.chrisse.se\/index.php?rest_route=\/wp\/v2\/posts\/981\/revisions\/1064"}],"wp:attachment":[{"href":"https:\/\/blog.chrisse.se\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=981"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.chrisse.se\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=981"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.chrisse.se\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}