diff --git a/src/security/validity-period.cpp b/src/security/validity-period.cpp
index c6f6026..14ba0f2 100644
--- a/src/security/validity-period.cpp
+++ b/src/security/validity-period.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2015 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -39,6 +39,12 @@
 
 using boost::chrono::time_point_cast;
 
+ValidityPeriod::ValidityPeriod()
+  : ValidityPeriod(time::system_clock::TimePoint() + time::nanoseconds(1),
+                   time::system_clock::TimePoint())
+{
+}
+
 ValidityPeriod::ValidityPeriod(const time::system_clock::TimePoint& notBefore,
                                const time::system_clock::TimePoint& notAfter)
   : m_notBefore(time_point_cast<TimePoint::duration>(notBefore + TimePoint::duration(1) -
@@ -144,7 +150,7 @@
 bool
 ValidityPeriod::isValid(const time::system_clock::TimePoint& now) const
 {
-  return m_notBefore < now && now < m_notAfter;
+  return m_notBefore <= now && now <= m_notAfter;
 }
 
 bool
diff --git a/src/security/validity-period.hpp b/src/security/validity-period.hpp
index ab24d68..d09657f 100644
--- a/src/security/validity-period.hpp
+++ b/src/security/validity-period.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2015 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -48,16 +48,16 @@
   };
 
 public:
-  /** @brief Set validity period (UNIX epoch, UNIX epoch) that is always invalid
+  /** @brief Set validity period [UNIX epoch + 1 nanosecond, UNIX epoch] that is always invalid
    */
-  ValidityPeriod() = default;
+  ValidityPeriod();
 
   /** @brief Create validity period from @p block
    */
   explicit
   ValidityPeriod(const Block& block);
 
-  /** @brief Create validity period (@p notBefore, @p notAfter)
+  /** @brief Create validity period [@p notBefore, @p notAfter]
    *  @param notBefore exclusive beginning of the validity period range
    *  @param notAfter exclusive end of the validity period range
    *
@@ -70,12 +70,12 @@
 
   /** @brief Check if @p now falls within the validity period
    *  @param now Time point to check if it falls within the period
-   *  @return periodBegin < @p now and @p now < periodEnd
+   *  @return periodBegin <= @p now and @p now <= periodEnd
    */
   bool
   isValid(const time::system_clock::TimePoint& now = time::system_clock::now()) const;
 
-  /** @brief Set validity period (@p notBefore, @p notAfter)
+  /** @brief Set validity period [@p notBefore, @p notAfter]
    *  @param notBefore exclusive beginning of the validity period range
    *  @param notAfter exclusive end of the validity period range
    *
diff --git a/tests/unit-tests/security/validity-period.t.cpp b/tests/unit-tests/security/validity-period.t.cpp
index db22b9e..1fc91cd 100644
--- a/tests/unit-tests/security/validity-period.t.cpp
+++ b/tests/unit-tests/security/validity-period.t.cpp
@@ -22,18 +22,23 @@
 #include "security/validity-period.hpp"
 
 #include "boost-test.hpp"
+#include "unit-tests/unit-test-time-fixture.hpp"
 #include <boost/lexical_cast.hpp>
 
 namespace ndn {
 namespace security {
-namespace test {
+namespace tests {
+
+using namespace ndn::tests;
 
 BOOST_AUTO_TEST_SUITE(Security)
 BOOST_AUTO_TEST_SUITE(TestValidityPeriod)
 
-BOOST_AUTO_TEST_CASE(ConstructorSetter)
+BOOST_FIXTURE_TEST_CASE(ConstructorSetter, UnitTestTimeFixture)
 {
-  time::system_clock::TimePoint notBefore = time::system_clock::now() - time::days(1);
+  time::system_clock::TimePoint now = this->systemClock->getNow();
+
+  time::system_clock::TimePoint notBefore = now - time::days(1);
   time::system_clock::TimePoint notAfter = notBefore + time::days(2);
 
   ValidityPeriod validity1 = ValidityPeriod(notBefore, notAfter);
@@ -46,13 +51,13 @@
   BOOST_CHECK_GT(period.second, notAfter - time::seconds(1));
   BOOST_CHECK_EQUAL(validity1.isValid(), true);
 
-  BOOST_CHECK_EQUAL(ValidityPeriod(time::system_clock::now() - time::days(2),
-                                   time::system_clock::now() - time::days(1)).isValid(),
+  BOOST_CHECK_EQUAL(ValidityPeriod(now - time::days(2),
+                                   now - time::days(1)).isValid(),
                     false);
 
   BOOST_CHECK_NO_THROW((ValidityPeriod()));
   ValidityPeriod validity2;
-  BOOST_CHECK(validity2.getPeriod() == std::make_pair(time::getUnixEpoch(), time::getUnixEpoch()));
+  BOOST_CHECK_EQUAL(validity2.isValid(), false);
 
   validity2.setPeriod(notBefore, notAfter);
   BOOST_CHECK(validity2.getPeriod() != std::make_pair(time::getUnixEpoch(), time::getUnixEpoch()));
@@ -66,6 +71,9 @@
                       time::getUnixEpoch() + time::days(10 * 365) + time::nanoseconds(1));
   BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(validity1),
                     "(19700101T000001, 19791230T000000)");
+
+  BOOST_CHECK_EQUAL(ValidityPeriod(now, now).isValid(), true);
+  BOOST_CHECK_EQUAL(ValidityPeriod(now + time::seconds(1), now).isValid(), false);
 }
 
 const uint8_t VP1[] = {
@@ -188,6 +196,6 @@
 BOOST_AUTO_TEST_SUITE_END() // TestValidityPeriod
 BOOST_AUTO_TEST_SUITE_END() // Security
 
-} // namespace test
+} // namespace tests
 } // namespace security
 } // namespace ndn
