Python3 java.util import Date
Opened this issue · 5 comments
For Resilient scripts using python3, we cannot import Date from java.util. This needs to be updated for python3 scripts that use datetime
Primarily looking for an update to "Working with Dates and Date Time Fields.md" for guidance
I'd like to see an update for this as well.
Error Running Script: Script execution failed with message 'Script contains the following illegal imports: datetime.datetime' on line number 1.
Any update on import Date from Java.util in python3?
Python 3 Changes : Date module no longer valid
"import date" is replaced by "import datetime"
SAMPLE:
#Set the task due date to 31 days later
import datetime as dt
discovered_datexx = dt.datetime.fromtimestamp(incident.discovered_date / 1000)
month_ahead = discovered_datexx + dt.timedelta(days=31)
task.due_date = month_ahead