The real-time clock allows a user to automatically print the time and date on labels. There are 2 ways to set dates and times for a real-time clock.
![](/servlet/rtaImage?eid=ka16S000000C3ys&feoid=00N0H00000K2Eou&refid=0EM0H000001O9Bq) | NOTE Ensure you download the latest firmware of the printer before setting the real-time clock. |
You may use the ^ST (Set Time) ZPL command. Refer to ZPL Commands: ^ST Set Time and Date for more information.
^STMonth,Day,Year,Hour,Minute,Second,Format
Month = value from 01 to 12 as Month.
Day = value from 01 to 31 as Day.
Year = value from 1998 to 2097 as Year.
Hour = value from 00 to 23 as Hour in 24-hour format.
Minute = value from 00 to 59 as Minute.
Second = value from 00 to 59 as Second.
Format = A = am or P = pm or M = 24-hour military format.
For example, if you want to set 28th of August 2016 01:15 pm, then the command you send should be:
^XA
^ST08,28,2016,01,15,0,P^FS
^XZ
You may use the Zebra Setup Utilities under Open Communication with Printer and put the following command.
![User-added image](/servlet/rtaImage?eid=ka16S000000C3ys&feoid=00N0H00000K2Eou&refid=0EMi0000000QRTQ)
Print the configuration label and you will notice the time has been set.
Another alternative is to use the SGD (SetGetDo) command. Keep in mind that the SGD command on real-time clock time is only in 24-hour format and thus you have to convert, (i.e. 13:00:00 would be 1 pm.).
! U1 setvar "rtc.date" "08-28-2016"
! U1 setvar "rtc.time" "13:15:00"
You can do the following command to see if the value of the printer was set:
! U1 getvar "rtc.date"
! U1 getvar "rtc.time"
![User-added image](/servlet/rtaImage?eid=ka16S000000C3ys&feoid=00N0H00000K2Eou&refid=0EMi0000000QRTV)
Helpful Information