~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/time/second.cc

  • Committer: Monty Taylor
  • Date: 2009-04-14 19:16:51 UTC
  • mto: (997.2.5 mordred)
  • mto: This revision was merged to the branch mainline in revision 994.
  • Revision ID: mordred@inaugust.com-20090414191651-ltbww6hpqks8k7qk
Clarified instructions in README.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include "config.h"
 
20
#include "drizzled/server_includes.h"
 
21
#include CSTDINT_H
21
22
#include "drizzled/temporal.h"
22
23
#include "drizzled/error.h"
23
24
#include "drizzled/function/time/second.h"
24
25
 
25
 
namespace drizzled
26
 
{
27
 
 
28
26
int64_t Item_func_second::val_int()
29
27
{
30
28
  assert(fixed);
51
49
   *
52
50
   * Oh, and Brian Aker MADE me do this. :) --JRP
53
51
   */
54
 
  Time temporal_time;
 
52
  drizzled::Time temporal_time;
55
53
  
56
54
  char time_buff[DRIZZLE_MAX_LENGTH_DATETIME_AS_STRING];
57
55
  String tmp_time(time_buff,sizeof(time_buff), &my_charset_utf8_bin);
63
61
     * representing a time value, so we grab the first argument 
64
62
     * as a DateTime object and try that for a match...
65
63
     */
66
 
    DateTime temporal_datetime;
 
64
    drizzled::DateTime temporal_datetime;
67
65
    Item_result arg0_result_type= args[0]->result_type();
68
66
    
69
67
    switch (arg0_result_type)
119
117
  return (int64_t) temporal_time.seconds();
120
118
}
121
119
 
122
 
} /* namespace drizzled */