/**
 * @file       WidgetTimeInput.h
 * @author     Volodymyr Shymanskyy
 * @license    This project is released under the MIT License (MIT)
 * @copyright  Copyright (c) 2015 Volodymyr Shymanskyy
 * @date       Aug 2016
 * @brief
 *
 */

#ifndef WidgetTimeInput_h
#define WidgetTimeInput_h

#include <Blynk/BlynkApi.h>
#include <utility/BlynkDateTime.h>

class TimeInputParam
{
public:

	TimeInputParam(const BlynkParam& param)
	{
		if (strlen(param[0].asStr())) {
			mStart = param[0].asLong();
		}
		if (strlen(param[1].asStr())) {
			mStop = param[1].asLong();
		}
		mTZ = param[2].asLong();
	}

	BlynkTime& getStart() { return mStart; }
	BlynkTime& getStop()  { return mStop;  }
    long getTZ()  const { return mTZ; }

private:
    BlynkTime mStart;
    BlynkTime mStop;
    long mTZ;
};

#endif

/**
 * @file       WidgetTimeInput.h
 * @author     Volodymyr Shymanskyy
 * @license    This project is released under the MIT License (MIT)
 * @copyright  Copyright (c) 2015 Volodymyr Shymanskyy
 * @date       Aug 2016
 * @brief
 *
 */

#ifndef WidgetTimeInput_h
#define WidgetTimeInput_h

#include <Blynk/BlynkApi.h>
#include <utility/BlynkDateTime.h>

class TimeInputParam
{
public:

	TimeInputParam(const BlynkParam& param)
		: mStart (param[0].asLong())
		, mStop  (param[1].asLong())
	{
		mTZ = param[2].asLong();
	}

	BlynkDateTime& getStart() { return mStart; }
	BlynkDateTime& getStop()  { return mStop;  }
    long getTZ()  const { return mTZ; }

private:
    BlynkDateTime mStart;
    BlynkDateTime mStop;
    long mTZ;
};

#endif

--- 
+++ 
@@ -19,19 +19,23 @@
 public:
 
 	TimeInputParam(const BlynkParam& param)
-		: mStart (param[0].asLong())
-		, mStop  (param[1].asLong())
 	{
+		if (strlen(param[0].asStr())) {
+			mStart = param[0].asLong();
+		}
+		if (strlen(param[1].asStr())) {
+			mStop = param[1].asLong();
+		}
 		mTZ = param[2].asLong();
 	}
 
-	BlynkDateTime& getStart() { return mStart; }
-	BlynkDateTime& getStop()  { return mStop;  }
+	BlynkTime& getStart() { return mStart; }
+	BlynkTime& getStop()  { return mStop;  }
     long getTZ()  const { return mTZ; }
 
 private:
-    BlynkDateTime mStart;
-    BlynkDateTime mStop;
+    BlynkTime mStart;
+    BlynkTime mStop;
     long mTZ;
 };
 
Switch to Time instead of DateTime
