~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_time.cc

  • Committer: Brian Aker
  • Date: 2009-10-12 06:15:02 UTC
  • mfrom: (1165.1.178 static-functions)
  • Revision ID: brian@gaz-20091012061502-cds4m0cya7ow8sj7
Merge Stewart

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
using namespace std;
28
28
 
 
29
static int check_time_range(DRIZZLE_TIME *my_time, int *warning);
 
30
 
29
31
/* Windows version of localtime_r() is declared in my_ptrhead.h */
30
32
 
31
33
uint64_t log_10_int[20]=
676
678
    1        time value is invalid
677
679
*/
678
680
 
679
 
int check_time_range(DRIZZLE_TIME *my_time, int *warning)
 
681
static int check_time_range(DRIZZLE_TIME *my_time, int *warning)
680
682
{
681
683
  int64_t hour;
682
684
 
1014
1016
    number of characters written to 'to'
1015
1017
*/
1016
1018
 
1017
 
int my_time_to_str(const DRIZZLE_TIME *l_time, char *to)
 
1019
static int my_time_to_str(const DRIZZLE_TIME *l_time, char *to)
1018
1020
{
1019
1021
  uint32_t extra_hours= 0;
1020
1022
  return sprintf(to, "%s%02u:%02u:%02u",
1192
1194
 
1193
1195
/* Convert DRIZZLE_TIME value to integer in YYYYMMDD format */
1194
1196
 
1195
 
uint64_t TIME_to_uint64_t_date(const DRIZZLE_TIME *my_time)
 
1197
static uint64_t TIME_to_uint64_t_date(const DRIZZLE_TIME *my_time)
1196
1198
{
1197
1199
  return (uint64_t) (my_time->year * 10000UL + my_time->month * 100UL +
1198
1200
                      my_time->day);
1205
1207
  it's assumed that days have been converted to hours already.
1206
1208
*/
1207
1209
 
1208
 
uint64_t TIME_to_uint64_t_time(const DRIZZLE_TIME *my_time)
 
1210
static uint64_t TIME_to_uint64_t_time(const DRIZZLE_TIME *my_time)
1209
1211
{
1210
1212
  return (uint64_t) (my_time->hour * 10000UL +
1211
1213
                      my_time->minute * 100UL +