The clock works perfectly when the root is at zero rotation (apart from some sync issues with the second hand). The "fun" starts when I try to rotate the object. For example, when I rotate 90 degrees along the global X axis so it stands straight up (local Y is 12 o'clock) it flips the rotation of the hands from negative local Z rotation to positive. Same with 90 degrees Y rotation. When I combine those two rotations the hands flips axis of rotation and rotate negative local Y. Globally this last rotation is the same as when the root is at zero rotation.
Obviosly I must be doing something wrong.

Here's the code I use to set the rotation of the minute hand from the root prim:
CODE
llSetLinkPrimitiveParams(3, [PRIM_ROTATION, <0.0, 0.0, llSin(-min*TWO_PI/120.0), llCos(-min*TWO_PI/120.0)> * llGetRot()]);
min = the variable that holds the minute value
I've read the wiki and searched for similar threads. Nothing helped me so far. From reading other threads I got several different approaches to making a clock, but I want it this way. Or at least understand why it doesn't work properly.
My understanding from the wiki and other threads is that:
CODE
rotation local_rot = offset * llGetRot();
Which is what I thought I was doing in my code...
Any ideas?