I’ve defined the following script:
def logEventGlobal (msg):
import system
# Logs an event to the LogGlobal database...
from java.util import Date
currentDate = Date()
curDateStr = system.db.dateFormat(currentDate,"yyyy-MM-dd H:mm:ss")
rowCnt = system.db.runUpdateQuery("INSERT INTO LogGlobal (MessageDateTime, MessageText,Source) VALUES('" + curDateStr + "','" + msg + "','Ignition')")
It works fine except for the MessageDateTime column I only get the date in the database. The time is always ‘00:00:00.’ Where is my time going?