How to set the time on your Commodore C64 / C128

Commodore LogoDid you know that the Commodore computers had a built-in clock? It wasn’t an exact science, and it didn’t show the date, but it was able to display a 24hr clock.

It did this by counting how many seconds your machine was switched on, accessible in two variables TI and TI$ (short for TIME).

TI$ is a string value in the format HHMMss, counting seconds. 112347 would mean 11:23am and 47 seconds. TI$ will be 000000 when you switch on the system. You can set it just like any other variable to set the time:

TI counts the number of 60th seconds since the system was switched on (don’t ask):

Both values reset when you reset the system. Like all internal computer clocks it is relatively accurate, but does drift a second or two per day (we don’t notice this on modern systems because those talk to an NTP server once every day and sync themselves).

TI and TI$ are present on the C64, C128, Plus/4 and many other Commodore variants.

About Jay Versluis

Jay is a medical miracle known as a Super Survivor. He runs two YouTube channels, five websites and several podcast feeds. To see what else he's up to, and to support him on his mission to make the world a better place, check out his Patreon Campaign.

Add your voice!