aboutsummaryrefslogtreecommitdiff
path: root/include/datetime
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2015-04-06 13:16:24 -0500
committerCharles Kerr <charles.kerr@canonical.com>2015-04-06 13:16:24 -0500
commit4438c3a50d4c10d7516d736cb31ded01c57c791e (patch)
tree646150852f6f796f41db56e7dcf82f128b0c49b8 /include/datetime
parentaf81477b2f5d4ffc76c51c72bd3ac89a4c4cac64 (diff)
downloadayatana-indicator-datetime-4438c3a50d4c10d7516d736cb31ded01c57c791e.tar.gz
ayatana-indicator-datetime-4438c3a50d4c10d7516d736cb31ded01c57c791e.tar.bz2
ayatana-indicator-datetime-4438c3a50d4c10d7516d736cb31ded01c57c791e.zip
in DateTime class, make it harder to accidentally mix local and nonlocal timezones by replacing DateTime::DateTime(time_t) with two methods, DateTime::Local(time_t) and DateTime(GTimeZone*, time_t)
Diffstat (limited to 'include/datetime')
-rw-r--r--include/datetime/date-time.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/datetime/date-time.h b/include/datetime/date-time.h
index 7e19a9d..ea9ea36 100644
--- a/include/datetime/date-time.h
+++ b/include/datetime/date-time.h
@@ -37,10 +37,11 @@ class DateTime
{
public:
static DateTime NowLocal();
+ static DateTime Local(time_t);
static DateTime Local(int year, int month, int day, int hour, int minute, double seconds);
DateTime();
- explicit DateTime(time_t t);
+ DateTime(GTimeZone* tz, time_t t);
DateTime(GTimeZone* tz, GDateTime* dt);
DateTime(GTimeZone* tz, int year, int month, int day, int hour, int minute, double seconds);
DateTime& operator=(const DateTime& in);