%d UNIX outputs the UNIX time in seconds. %d UNIX_MILLIS outputs the UNIX time in milliseconds. The UNIX time is the real difference, in seconds for UNIX As well as in milliseconds for UNIX_MILLIS, among the current time and midnight, January one, 1970 UTC. When enough time unit is milliseconds, the granularity depends on the running technique (Hom