Index: trunk/FACT++/src/drivectrl.cc
===================================================================
--- trunk/FACT++/src/drivectrl.cc	(revision 14668)
+++ trunk/FACT++/src/drivectrl.cc	(revision 14669)
@@ -1151,4 +1151,22 @@
     }
 
+    int ShiftSunRise()
+    {
+        const Time sunrise = fSunRise;
+
+        fSunRise = GetSunRise(Time());
+        if (!fSunRise)
+            return T::kSM_FatalError;
+
+        if (sunrise==fSunRise)
+            return Drive::State::kLocked;
+
+        ostringstream msg;
+        msg << "Next sun-rise will be at " << fSunRise;
+        T::Info(msg);
+
+        return Drive::State::kLocked;
+    }
+
     int Execute()
     {
@@ -1161,22 +1179,11 @@
 
         if (T::GetCurrentState()==Drive::State::kLocked)
-            return Drive::State::kLocked;
-
+            return ShiftSunRise();
 
         if (T::GetCurrentState()>Drive::State::kLocked)
         {
-            Time now;
-            if (now>fSunRise)
+            if (Time()>fSunRise)
             {
                 SendCommand("PREPS Park", false);
-
-                fSunRise = GetSunRise(now);
-                if (!fSunRise)
-                    return T::kSM_FatalError;
-
-                ostringstream msg;
-                msg << "Next sun-rise will be at " << fSunRise;
-                T::Info(msg);
-
                 return Drive::State::kLocked;
             }
