summaryrefslogtreecommitdiffstats
path: root/sql/tztime.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sql/tztime.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/sql/tztime.h b/sql/tztime.h
index 6d8af62e..7c96f8b9 100644
--- a/sql/tztime.h
+++ b/sql/tztime.h
@@ -33,11 +33,12 @@ class THD;
class THD;
/**
- This class represents abstract time zone and provides
+ This class represents abstract time zone and provides
basic interface for MYSQL_TIME <-> my_time_t conversion.
- Actual time zones which are specified by DB, or via offset
+ Actual time zones which are specified by DB, or via offset
or use system functions are its descendants.
*/
+
class Time_zone: public Sql_alloc
{
public:
@@ -62,12 +63,21 @@ public:
*/
virtual const String * get_name() const = 0;
+ virtual void get_timezone_information(struct my_tz* curr_tz, const MYSQL_TIME *local_TIME) const = 0;
+
/**
We need this only for surpressing warnings, objects of this type are
allocated on MEM_ROOT and should not require destruction.
*/
virtual ~Time_zone() = default;
+ /**
+ Check if the time zone does not have any anomalies around "sec", such as:
+ - DST changes (spring forward, fall back)
+ - leap seconds (the 60-th second)
+ */
+ bool is_monotone_continuous_around(my_time_t sec) const;
+
protected:
static inline void adjust_leap_second(MYSQL_TIME *t);
};