~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/temporal.cc

  • Committer: Brian Aker
  • Date: 2010-12-22 16:10:11 UTC
  • mfrom: (2017.1.2 clean)
  • Revision ID: brian@tangent.org-20101222161011-dwdhckv8ptmo471c
Rollup of build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1125
1125
     + _seconds;
1126
1126
}
1127
1127
 
 
1128
// We fill the structure based on just int
 
1129
void Time::to_uint64_t(uint64_t &to) const
 
1130
{
 
1131
  to= _hours * 24
 
1132
     + _minutes * 60
 
1133
     + _seconds;
 
1134
}
 
1135
 
1128
1136
void DateTime::to_int64_t(int64_t *to) const
1129
1137
{
1130
1138
  *to= ((
1348
1356
    return false;
1349
1357
}
1350
1358
 
1351
 
void Date::to_time_t(time_t *to) const
 
1359
void Date::to_time_t(time_t &to) const
1352
1360
{
1353
1361
  if (in_unix_epoch())
1354
1362
  {
1355
 
    *to= _epoch_seconds;
 
1363
    to= _epoch_seconds;
1356
1364
  }
1357
1365
  else
1358
 
    *to= 0;
 
1366
  {
 
1367
    to= 0;
 
1368
  }
1359
1369
}
1360
1370
 
1361
 
void Timestamp::to_time_t(time_t *to) const
 
1371
void Timestamp::to_time_t(time_t &to) const
1362
1372
{
1363
 
  *to= _epoch_seconds;
 
1373
  to= _epoch_seconds;
1364
1374
}
1365
1375
 
1366
1376
void MicroTimestamp::to_timeval(struct timeval *to) const