aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/datetime/date-time.h2
-rw-r--r--src/date-time.cpp2
2 files changed, 1 insertions, 3 deletions
diff --git a/include/datetime/date-time.h b/include/datetime/date-time.h
index 6e73ff3..8fa1569 100644
--- a/include/datetime/date-time.h
+++ b/include/datetime/date-time.h
@@ -68,7 +68,7 @@ public:
static bool is_same_day(const DateTime& a, const DateTime& b);
static bool is_same_minute(const DateTime& a, const DateTime& b);
- bool is_set() const { return m_dt != nullptr; }
+ bool is_set() const { return m_tz && m_dt; }
private:
void reset(GTimeZone*, GDateTime*);
diff --git a/src/date-time.cpp b/src/date-time.cpp
index 47ca047..4176d06 100644
--- a/src/date-time.cpp
+++ b/src/date-time.cpp
@@ -88,7 +88,6 @@ DateTime DateTime::to_timezone(const std::string& zone) const
DateTime DateTime::start_of_day() const
{
g_assert(is_set());
- g_assert(m_tz.get() != nullptr);
int y=0, m=0, d=0;
ymd(y, m, d);
@@ -101,7 +100,6 @@ DateTime DateTime::start_of_day() const
DateTime DateTime::start_of_minute() const
{
g_assert(is_set());
- g_assert(m_tz.get() != nullptr);
int y=0, m=0, d=0;
ymd(y, m, d);