summaryrefslogtreecommitdiff
path: root/include/my_time.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/my_time.h')
-rw-r--r--include/my_time.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/my_time.h b/include/my_time.h
index e42f7e9e402..d4dbe459c3b 100644
--- a/include/my_time.h
+++ b/include/my_time.h
@@ -27,6 +27,16 @@
C_MODE_START
extern ulonglong log_10_int[20];
+extern uchar days_in_month[];
+
+/*
+ Portable time_t replacement.
+ Should be signed and hold seconds for 1902-2038 range.
+*/
+typedef long my_time_t;
+
+#define MY_TIME_T_MAX LONG_MAX
+#define MY_TIME_T_MIN LONG_MIN
#define YY_PART_YEAR 70
@@ -41,6 +51,15 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
bool str_to_time(const char *str,uint length, MYSQL_TIME *l_time,
int *was_cut);
+long calc_daynr(uint year,uint month,uint day);
+
+void init_time(void);
+
+my_time_t
+my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, bool *in_dst_time_gap);
+
+void set_zero_time(MYSQL_TIME *tm);
+
C_MODE_END
#endif /* _my_time_h_ */