~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Monty Taylor
  • Date: 2010-02-05 08:11:15 UTC
  • mfrom: (1283 build)
  • mto: (1273.13.43 fix_is)
  • mto: This revision was merged to the branch mainline in revision 1300.
  • Revision ID: mordred@inaugust.com-20100205081115-dr82nvrwv4lvw7sd
Merged trunk.

Show diffs side-by-side

added added

removed removed

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