summaryrefslogtreecommitdiffstats
path: root/sql/tztime.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-01 18:15:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-01 18:15:00 +0000
commita2a2e32c02643a0cec111511220227703fda1cd5 (patch)
tree69cc2b631234c2a8e026b9cd4d72676c61c594df /sql/tztime.h
parentReleasing progress-linux version 1:10.11.8-1~progress7.99u1. (diff)
downloadmariadb-a2a2e32c02643a0cec111511220227703fda1cd5.tar.xz
mariadb-a2a2e32c02643a0cec111511220227703fda1cd5.zip
Merging upstream version 1:11.4.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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);
};