~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2011-01-19 18:03:32 UTC
  • mfrom: (2088.8.12 timestamp)
  • mto: This revision was merged to the branch mainline in revision 2098.
  • Revision ID: brian@tangent.org-20110119180332-acfk5i8oofp63s40
Merge in time code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
{
32
32
  bool res= get_arg0_time(ltime);
33
33
 
34
 
  if (ltime->time_type == DRIZZLE_TIMESTAMP_DATETIME)
 
34
  if (ltime->time_type == type::DRIZZLE_TIMESTAMP_DATETIME)
35
35
    ltime->year= ltime->month= ltime->day= 0;
36
36
 
37
 
  ltime->time_type= DRIZZLE_TIMESTAMP_TIME;
 
37
  ltime->time_type= type::DRIZZLE_TIMESTAMP_TIME;
38
38
 
39
39
  return res;
40
40
}
47
47
  if (not get_arg0_time(&ltime))
48
48
  {
49
49
    null_value= 0;
50
 
    make_time(&ltime, str);
 
50
    ltime.convert(*str, type::DRIZZLE_TIMESTAMP_TIME);
 
51
 
51
52
    return str;
52
53
  }
53
54