The command (or rather function) moonIntensity is discontinuous, which is clearly a bug. The reason is most like the command (or again function) moonPhase which is also discontinuous, since it only gets updated on a new day (i.e. hours, minutes and seconds are ignored) and as such moonPhase is a step-function. I suspect that moonIntensity uses moonPhase as an input, hence the discontinuinity at the jump to a new day.
Fix/suggestion: a call to moonPhase should recalculate/update the moonPhase taking hours, minutes and seconds into account. I.e. no need to internally keep it updated/continuous for no reason, but if we request this, please, calculate it again. I think moonIntensity should be indirectly fixed this way.
And if this doesn't sound like a good idea, at least work with an uptodate/more exact moonPhase value for calls to moonIntensity.