The code you are showing is wrong because DrupalDateTime::__construct()
is expecting a string, while you are passing an integer, which is what Node::getCreatedTime()
returns. As for the other methods you are using, I don't see them listed in the methods available for the DrupalDateTime
class.
avpaderno
- 97.9k
- 15
- 164
- 284