Thanks a lot
i use the code
devicetime = sys.argv[1]
devicetime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
is success exchange the unix time
but i have a question i use time.localtime()
when i in qradar os command line execute this python the out put message show is right local time
but when to custom action page run execute the out put message is show
Coordinated Universal Time (UTC)
no my local time , my local time is UTC +8
------------------------------
Hung-Ting Chou
------------------------------
Original Message:
Sent: Wed August 25, 2021 12:14 PM
From: Moises Monge
Subject: Custom action and Python
You can use the date.strftime(format) method from the datetime library.
https://docs.python.org/3/library/datetime.html
DeviceTime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(DeviceTime))
------------------------------
Moises Monge
------------------------------