{"action":"created","issue":{"url":"https://api.github.com/repos/capitalone/cloud-custodian/issues/2489","repository_url":"https://api.github.com/repos/capitalone/cloud-custodian","labels_url":"https://api.github.com/repos/capitalone/cloud-custodian/issues/2489/labels{/name}","comments_url":"https://api.github.com/repos/capitalone/cloud-custodian/issues/2489/comments","events_url":"https://api.github.com/repos/capitalone/cloud-custodian/issues/2489/events","html_url":"https://github.com/capitalone/cloud-custodian/issues/2489","id":330333223,"node_id":"MDU6SXNzdWUzMzAzMzMyMjM=","number":2489,"title":"Cloudtrail mode with \"mark-for-op\" action with 0 days not working as expected","user":{"login":"mkundrapu","id":40034085,"node_id":"MDQ6VXNlcjQwMDM0MDg1","avatar_url":"https://avatars1.githubusercontent.com/u/40034085?v=4","gravatar_id":"","url":"https://api.github.com/users/mkundrapu","html_url":"https://github.com/mkundrapu","followers_url":"https://api.github.com/users/mkundrapu/followers","following_url":"https://api.github.com/users/mkundrapu/following{/other_user}","gists_url":"https://api.github.com/users/mkundrapu/gists{/gist_id}","starred_url":"https://api.github.com/users/mkundrapu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkundrapu/subscriptions","organizations_url":"https://api.github.com/users/mkundrapu/orgs","repos_url":"https://api.github.com/users/mkundrapu/repos","events_url":"https://api.github.com/users/mkundrapu/events{/privacy}","received_events_url":"https://api.github.com/users/mkundrapu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-07T15:49:48Z","updated_at":"2018-06-07T17:44:16Z","closed_at":null,"author_association":"NONE","body":"Team,\r\n   we wrote a policy to add custom tags while creating dynamodb table and we used “cloudtrail” mode with actions “mark-for-op” with days as 0. Our understand is that, if we provide 0 as value, the value of the date in the tag value will be the same day when the event is triggered. But this policy executed today and the value of the date in tag  is 2018/06/11, but we expect it be 2018/06/07. Can you please look in to it? \r\n\r\nNote: This is the same issue we observed with other resource types too.\r\n\r\nPolicy:\r\n```yaml\r\n    mode:\r\n       type: cloudtrail\r\n       tags:\r\n         *custodian-tags\r\n       events:\r\n         - event: CreateTable\r\n           source: \"dynamodb.amazonaws.com\"\r\n           ids: \"requestParameters.tableName\"\r\n    filters:\r\n       - or: *required-tags-absent\r\n    actions:\r\n       - type: mark-for-op\r\n         tag: custodian_tagging\r\n         msg: \"This DynamoDB table is missing at least one of the required tags: {op}@{action_date}\"\r\n         days: 0\r\n         op: delete\r\n```\r\nThis is the tag value generated:\r\n        This DynamoDB table is missing at least one of the required tags: delete@2018/06/11"},"comment":{"url":"https://api.github.com/repos/capitalone/cloud-custodian/issues/comments/395506340","html_url":"https://github.com/capitalone/cloud-custodian/issues/2489#issuecomment-395506340","issue_url":"https://api.github.com/repos/capitalone/cloud-custodian/issues/2489","id":395506340,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTUwNjM0MA==","user":{"login":"thisisshi","id":4026535,"node_id":"MDQ6VXNlcjQwMjY1MzU=","avatar_url":"https://avatars1.githubusercontent.com/u/4026535?v=4","gravatar_id":"","url":"https://api.github.com/users/thisisshi","html_url":"https://github.com/thisisshi","followers_url":"https://api.github.com/users/thisisshi/followers","following_url":"https://api.github.com/users/thisisshi/following{/other_user}","gists_url":"https://api.github.com/users/thisisshi/gists{/gist_id}","starred_url":"https://api.github.com/users/thisisshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thisisshi/subscriptions","organizations_url":"https://api.github.com/users/thisisshi/orgs","repos_url":"https://api.github.com/users/thisisshi/repos","events_url":"https://api.github.com/users/thisisshi/events{/privacy}","received_events_url":"https://api.github.com/users/thisisshi/received_events","type":"User","site_admin":false},"created_at":"2018-06-07T17:44:16Z","updated_at":"2018-06-07T17:44:16Z","author_association":"COLLABORATOR","body":"Ah sorry, misread the original question"}}
{"actor":{"display_login":"thisisshi"}}