~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Mark Atwood
  • Date: 2011-08-11 03:05:03 UTC
  • mfrom: (2385.1.12 refactor4)
  • Revision ID: me@mark.atwood.name-20110811030503-rp9xjihc5x3y0x4q
mergeĀ lp:~olafvdspek/drizzle/refactor4

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 <config.h>
21
21
 
22
22
#include <drizzled/function/time/now.h>
 
23
#include <drizzled/current_session.h>
23
24
#include <drizzled/session.h>
24
 
 
25
 
#include "drizzled/temporal.h"
26
 
 
27
 
namespace drizzled
28
 
{
 
25
#include <drizzled/session/times.h>
 
26
#include <drizzled/temporal.h>
 
27
#include <drizzled/field.h>
 
28
 
 
29
namespace drizzled {
29
30
 
30
31
String *Item_func_now::val_str(String *)
31
32
{
63
64
{
64
65
  Session *session= current_session;
65
66
  uint32_t fractional_seconds= 0;
66
 
  time_t tmp= session->getCurrentTimestampEpoch(fractional_seconds);
 
67
  time_t tmp= session->times.getCurrentTimestampEpoch(fractional_seconds);
67
68
 
68
69
#if 0
69
70
  now_time->store(tmp, fractional_seconds, true);
78
79
*/
79
80
void Item_func_now_utc::store_now_in_TIME(type::Time &now_time)
80
81
{
81
 
  Session *session= current_session;
82
82
  uint32_t fractional_seconds= 0;
83
 
  time_t tmp= session->getCurrentTimestampEpoch(fractional_seconds);
84
 
 
 
83
  time_t tmp= current_session->times.getCurrentTimestampEpoch(fractional_seconds);
85
84
  now_time.store(tmp, fractional_seconds);
86
85
}
87
86