~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/tztime.h

  • Committer: Brian Aker
  • Date: 2010-12-25 04:38:28 UTC
  • mto: This revision was merged to the branch mainline in revision 2031.
  • Revision ID: brian@tangent.org-20101225043828-fz83ma79dvqaxvri
Update for moving DRIZZLE_TIME to type::Time

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
{
39
39
 
40
40
class String;
41
 
typedef struct st_drizzle_time DRIZZLE_TIME;
 
41
 
 
42
namespace type {
 
43
class Time;
 
44
}
42
45
 
43
46
/**
44
47
  This class represents abstract time zone and provides
45
 
  basic interface for DRIZZLE_TIME <-> time_t conversion.
 
48
  basic interface for type::Time <-> time_t conversion.
46
49
  Actual time zones which are specified by DB, or via offset
47
50
  or use system functions are its descendants.
48
51
*/
51
54
public:
52
55
  Time_zone() {}                              /* Remove gcc warning */
53
56
  /**
54
 
    Converts local time in broken down DRIZZLE_TIME representation to
 
57
    Converts local time in broken down type::Time representation to
55
58
    time_t (UTC seconds since Epoch) represenation.
56
59
    Returns 0 in case of error. Sets in_dst_time_gap to true if date provided
57
60
    falls into spring time-gap (or lefts it untouched otherwise).
58
61
  */
59
 
  virtual time_t TIME_to_gmt_sec(const DRIZZLE_TIME *t,
 
62
  virtual time_t TIME_to_gmt_sec(const type::Time *t,
60
63
                                 bool *in_dst_time_gap) const = 0;
61
64
  /**
62
65
    Converts time in time_t representation to local time in
63
 
    broken down DRIZZLE_TIME representation.
 
66
    broken down type::Time representation.
64
67
  */
65
 
  virtual void   gmt_sec_to_TIME(DRIZZLE_TIME *tmp, time_t t) const = 0;
 
68
  virtual void   gmt_sec_to_TIME(type::Time *tmp, time_t t) const = 0;
66
69
  /**
67
70
    Because of constness of String returned by get_name() time zone name
68
71
    have to be already zeroended to be able to use String::ptr() instead