~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

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