~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/tztime.cc

  • Committer: Brian Aker
  • Date: 2011-01-25 07:22:15 UTC
  • mfrom: (2109.1.7 drizzle-build)
  • Revision ID: brian@tangent.org-20110125072215-567z6uzy5vdvn4va
Merge in build/timestamp patches/fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
{
50
50
public:
51
51
  Time_zone_system() {}                       /* Remove gcc warning */
52
 
  virtual type::Time::epoch_t TIME_to_gmt_sec(const type::Time *t,
 
52
  virtual type::Time::epoch_t TIME_to_gmt_sec(const type::Time &t,
53
53
                                              bool *in_dst_time_gap) const;
54
 
  virtual void gmt_sec_to_TIME(type::Time *tmp, type::Time::epoch_t t) const;
 
54
  virtual void gmt_sec_to_TIME(type::Time &tmp, type::Time::epoch_t t) const;
55
55
  virtual const String * get_name() const;
56
56
};
57
57
 
81
81
 * Corresponding type::Time::epoch_t value or 0 in case of error
82
82
 */
83
83
type::Time::epoch_t
84
 
Time_zone_system::TIME_to_gmt_sec(const type::Time *t, bool *in_dst_time_gap) const
 
84
Time_zone_system::TIME_to_gmt_sec(const type::Time &t, bool *in_dst_time_gap) const
85
85
{
86
86
  long not_used;
87
 
  return my_system_gmt_sec(t, &not_used, in_dst_time_gap);
 
87
  type::Time::epoch_t tmp;
 
88
  t.convert(tmp, &not_used, in_dst_time_gap);
 
89
  return tmp;
88
90
}
89
91
 
90
92
 
103
105
 * the 1902 easily.
104
106
 */
105
107
void
106
 
Time_zone_system::gmt_sec_to_TIME(type::Time *tmp, type::Time::epoch_t t) const
 
108
Time_zone_system::gmt_sec_to_TIME(type::Time &tmp, type::Time::epoch_t t) const
107
109
{
108
 
  tmp->store(t);
 
110
  tmp.store(t);
109
111
}
110
112
 
111
113