~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/tztime.h

  • Committer: Mark Atwood
  • Date: 2011-05-09 00:03:05 UTC
  • mfrom: (2281.4.17 prune2)
  • Revision ID: me@mark.atwood.name-20110509000305-dilr9ms7n7p1dmnk
merge lp:~olafvdspek/drizzle/prune remove tztime

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
5
 
 *
6
 
 *  This program is free software; you can redistribute it and/or modify
7
 
 *  it under the terms of the GNU General Public License as published by
8
 
 *  the Free Software Foundation; either version 2 of the License, or
9
 
 *  (at your option) any later version.
10
 
 *
11
 
 *  This program is distributed in the hope that it will be useful,
12
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
 *  GNU General Public License for more details.
15
 
 *
16
 
 *  You should have received a copy of the GNU General Public License
17
 
 *  along with this program; if not, write to the Free Software
18
 
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
 
 */
20
 
 
21
 
#pragma once
22
 
 
23
 
#include <drizzled/memory/sql_alloc.h>
24
 
#include <drizzled/type/time.h>
25
 
 
26
 
namespace drizzled {
27
 
 
28
 
/**
29
 
  This class represents abstract time zone and provides
30
 
  basic interface for type::Time <-> type::Time::epoch_t conversion.
31
 
  Actual time zones which are specified by DB, or via offset
32
 
  or use system functions are its descendants.
33
 
*/
34
 
class Time_zone: public memory::SqlAlloc
35
 
{
36
 
public:
37
 
  /**
38
 
    Converts time in type::Time::epoch_t representation to local time in
39
 
    broken down type::Time representation.
40
 
  */
41
 
  virtual void gmt_sec_to_TIME(type::Time &tmp, type::Time::epoch_t t) const = 0;
42
 
 
43
 
  /**
44
 
    We need this only for surpressing warnings, objects of this type are
45
 
    allocated on memory::Root and should not require destruction.
46
 
  */
47
 
  virtual ~Time_zone() {};
48
 
};
49
 
 
50
 
extern Time_zone * my_tz_SYSTEM;
51
 
bool     my_tz_init(Session *org_session, const char *default_tzname);
52
 
 
53
 
} /* namespace drizzled */
54