47
47
class Time_zone_system : public Time_zone
50
Time_zone_system() {} /* Remove gcc warning */
51
virtual type::Time::epoch_t TIME_to_gmt_sec(const type::Time &t,
52
bool *in_dst_time_gap) const;
53
50
virtual void gmt_sec_to_TIME(type::Time &tmp, type::Time::epoch_t t) const;
54
virtual const String * get_name() const;
60
* Converts local time in system time zone in type::Time representation
61
* to its type::Time::epoch_t representation.
64
* This method uses system function (localtime_r()) for conversion
65
* local time in system time zone in type::Time structure to its type::Time::epoch_t
66
* representation. Unlike the same function for Time_zone_db class
67
* it it won't handle unnormalized input properly. Still it will
68
* return lowest possible type::Time::epoch_t in case of ambiguity or if we
69
* provide time corresponding to the time-gap.
71
* You should call init_time() function before using this function.
73
* @param t pointer to type::Time structure with local time in
74
* broken-down representation.
75
* @param in_dst_time_gap pointer to bool which is set to true if datetime
76
* value passed doesn't really exist (i.e. falls into
77
* spring time-gap) and is not touched otherwise.
80
* Corresponding type::Time::epoch_t value or 0 in case of error
83
Time_zone_system::TIME_to_gmt_sec(const type::Time &t, bool *in_dst_time_gap) const
86
type::Time::epoch_t tmp;
87
t.convert(tmp, ¬_used, in_dst_time_gap);
94
56
* Converts time from UTC seconds since Epoch (type::Time::epoch_t) representation
95
57
* to system local time zone broken-down representation.