PA job is throwing an error from a script used in a scoped application.
GlideDateTime API is only available in the global scope.
Add GlideDateTime in the scoped app scope by creating a record sys_scope_privilege.
Create a new record with the following:
TargetName -- GlideDateTime
Operations-- Execute API
Status -- allowed
source scope -- <your_application_scope>
Target scope -- Global
GlideDateTime API is used in scoped application as an alternative for gs.datediff().