{"id":2720,"date":"2013-10-10T03:21:06","date_gmt":"2013-10-10T03:21:06","guid":{"rendered":"https:\/\/www.wapshere.com\/missmiis\/?p=2720"},"modified":"2013-10-10T07:42:45","modified_gmt":"2013-10-10T07:42:45","slug":"the-meaning-of-today-in-a-temporal-set-filter","status":"publish","type":"post","link":"https:\/\/www.wapshere.com\/missmiis\/the-meaning-of-today-in-a-temporal-set-filter","title":{"rendered":"The meaning of &#8220;today&#8221; in a Temporal Set filter"},"content":{"rendered":"<p>I&#8217;ve been confusing myself no end with temporal set rules and I&#8217;ve finally figured out it&#8217;s because I thought &#8220;today&#8221; meant what it sounds like &#8211; whereas in fact it means &#8220;now&#8221;.<\/p>\n<p><!--more--><\/p>\n<p>So &#8220;1 day from today&#8221; means &#8220;this time tomorrow&#8221; and &#8220;1 day prior to today&#8221; means &#8220;this time yesterday&#8221;.<\/p>\n<p>This is very relevant when you have rules that do things like disable an account the day after the listed end date. Your transition set may have a rule like this:<\/p>\n<p>&#8220;EmployeeEndDate prior to today&#8221;<\/p>\n<p>This sounds clear enough &#8211; if the EmployeeEndDate is yesterday or earlier then transition in to the set and trigger the appropriate workflows. However the reality may be different with\u00c2\u00a0some accounts getting disabled <span style=\"text-decoration: underline;\">on<\/span> the end date, rather than waiting until the next day.<\/p>\n<p>By default the FIMTemporalEventsJob runs in SQL at 1am. If the user&#8217;s EmployeeEndDate is set to today&#8217;s date with a timestamp of &#8220;12:00:00 AM&#8221; this <em>time<\/em> is actually in the past when the 1am job runs, so the account gets disabled. Conversely if the timestamp was something like &#8220;8:00:00 AM&#8221; that time would still be in the future and the account would not get disabled until the following day &#8211; even though in both cases <strong>the date part\u00c2\u00a0is the same <\/strong>and we should be able to expect the same behaviour.<\/p>\n<p>The most important thing to do is get all timestamps set to a consistent &#8220;12:00:00 AM&#8221; local time wherever the date is\u00c2\u00a0of interest but we don&#8217;t care about the time. Controlling data entry points is a big part of it. The FIM RCDC forms will append &#8220;12:00:00 AM&#8221; when only the date is entered &#8211; but there&#8217;s no way to stop someone entering a timestamp as well. Scripts can help but you need to hardcode the XPath filter with specific dates &#8211; I have some data quality tasks that check particular date attributes up to 20 days in the future (one day at a time)\u00c2\u00a0looking for incorrect timestamps and normalising them. It&#8217;s not pretty, but seems to be necessary.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been confusing myself no end with temporal set rules and I&#8217;ve finally figured out it&#8217;s because I thought &#8220;today&#8221; meant what it sounds like &#8211; whereas in fact it means &#8220;now&#8221;.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":[]},"categories":[42,60,54],"tags":[],"class_list":["post-2720","post","type-post","status-publish","format-standard","hentry","category-fim-2010","category-fim-2010-r2","category-sets"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pkp1o-HS","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/2720","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/comments?post=2720"}],"version-history":[{"count":1,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/2720\/revisions"}],"predecessor-version":[{"id":2721,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/2720\/revisions\/2721"}],"wp:attachment":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/media?parent=2720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/categories?post=2720"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/tags?post=2720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}