The system variable VGVar.currentFormattedTime contains the current system time in HH:mm:ss format. The value is automatically updated each time it is referenced by your program.
timeField = VGVar.currentFormattedTime;
Related reference
EGL library DateTimeLib
System variables outside of EGL libraries