Its a pain to have to edit the minutes so I can set them. I would like to just be able to set the year, month, day, hour, minutes and second automatically when I connect the camera to the USB port.
There isn't really a convenient way to do this. You could use the PTP extension http://chdk.wikia.com/wiki/PTP_Extension
to run the same script functions using time values from your PC, but it wouldn't be automatic without additional work on your part. Also, installing the libusb driver will disable normal windows PTP functionality, so you may not want to do that if you normally use it to transfer files.
Using chdkptp, you could do something like this to set the camera time to your current pc time:
con 1> =return call_event_proc('FA.Create')
con 2> =return call_event_proc('InitializeAdjustmentFunction')
con 3> !return con:execwait(string.format("return call_event_proc('SetHour',%d),call_event_proc('SetMinute',%d),call_event_proc('SetSecond',%d),os.date()",os.date('%H'),os.date('%M'),os.date('%S')))
=true,1361390643,1361390643,1361390644,"Wed Feb 20 20:04:04 2013"
The various returns let you know if the functions worked. If either of the 1st two are -1, the registration names are different on your camera.
The final one should return the new camera time as the final result. The preceding values might be -1 if the functions weren't registered correctly.
You could of course put the whole thing in a file instead of typing it every time.
This will take some playing around. I've already found the date and time statements/commands in the lua syntax page at < http://www.lua.org/pil/22.1.html >. This would be a nice "standard" feature for CHDK.
CHDK lua does support os.date and os.time, with some minor exceptions relating to timezones and formats not supported by the underlying OS. However, these functions only get or format time values, they do not allow you to set the system clock.