I was googling around for this and came up empty handed, so maybe I can save somebody else some time ... I wanted to set the machine clock of a PowerBook G3, and didn't want to go through the hassle of booting to a usable system so I could use System Preferences. Also, I was unsure of whether or not my machine was saving the real time clock between reboots, so I needed a way to set the clock after powering on, but before booting into OS X.
Reboot your machine, and hold Command-Option-O-F during the boot process to access the Open Firmware prompt. Most likely, the real time clock is aliased in OF as rtc, so the command is this:
decimal dev rtc sec min hour day month year set-time
So to set the clock to 10 seconds past 11:15PM on December 31st, 2005, the command would be:
The Open Firmware prompt should type ok after this, and you can then boot the Mac by typing mac-boot and pressing Enter.
decimal dev rtc 10 15 23 31 12 2005 set-time
Mac OS X Hints