diff options
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sql/field.cc b/sql/field.cc index 0660e774396..2077a6e5455 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -3395,6 +3395,25 @@ String *Field_time::val_str(String *val_buffer, } +bool Field_time::get_date(TIME *ltime, + bool fuzzydate __attribute__((unused))) +{ + long tmp=(long) sint3korr(ptr); + ltime->neg=0; + if (tmp < 0) + { + ltime->neg= 1; + tmp=-tmp; + } + ltime->hour=tmp/10000; + tmp-=ltime->hour*10000; + ltime->minute= tmp/100; + ltime->second= tmp % 100; + ltime->year= ltime->month= ltime->day= ltime->second_part= 0; + return 0; +} + + bool Field_time::get_time(TIME *ltime) { long tmp=(long) sint3korr(ptr); |