what happens is that I have the code elaborated with the part you give me, and it works, but I have tested this code in localhost and in dev environment, and in both it works perfectly, but when I deploy it to stage (QA) it doesn't work, it doesn't bring me the value of the publish date.I add a try ...