~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/tztime.cc

  • Committer: Stewart Smith
  • Date: 2008-12-23 00:00:45 UTC
  • mfrom: (728 testable)
  • mto: This revision was merged to the branch mainline in revision 734.
  • Revision ID: stewart@flamingspork.com-20081223000045-4r4asnt8odzvqjpu
merge with mainline

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
/* Structure describing leap-second corrections. */
40
40
typedef struct lsinfo
41
41
{
42
 
  my_time_t ls_trans; // Transition time
 
42
  time_t ls_trans; // Transition time
43
43
  long      ls_corr;  // Correction to apply
44
44
} LS_INFO;
45
45
 
46
46
/*
47
 
  Structure with information describing ranges of my_time_t shifted to local
48
 
  time (my_time_t + offset). Used for local DRIZZLE_TIME -> my_time_t conversion.
 
47
  Structure with information describing ranges of time_t shifted to local
 
48
  time (time_t + offset). Used for local DRIZZLE_TIME -> time_t conversion.
49
49
  See comments for TIME_to_gmt_sec() for more info.
50
50
*/
51
51
typedef struct revtinfo
65
65
  uint32_t timecnt;  // Number of transitions between time types
66
66
  uint32_t typecnt;  // Number of local time types
67
67
  uint32_t charcnt;  // Number of characters used for abbreviations
68
 
  uint32_t revcnt;   // Number of transition descr. for TIME->my_time_t conversion
 
68
  uint32_t revcnt;   // Number of transition descr. for TIME->time_t conversion
69
69
  /* The following are dynamical arrays are allocated in MEM_ROOT */
70
 
  my_time_t *ats;       // Times of transitions between time types
 
70
  time_t *ats;       // Times of transitions between time types
71
71
  unsigned char *types; // Local time types for transitions
72
72
  TRAN_TYPE_INFO *ttis; // Local time types descriptions
73
73
  /* Storage for local time types abbreviations. They are stored as ASCIIZ */
78
78
  */
79
79
  LS_INFO *lsis;
80
80
  /*
81
 
    Starting points and descriptions of shifted my_time_t (my_time_t + offset)
82
 
    ranges on which shifted my_time_t -> my_time_t mapping is linear or undefined.
83
 
    Used for tm -> my_time_t conversion.
 
81
    Starting points and descriptions of shifted time_t (time_t + offset)
 
82
    ranges on which shifted time_t -> time_t mapping is linear or undefined.
 
83
    Used for tm -> time_t conversion.
84
84
  */
85
 
  my_time_t *revts;
 
85
  time_t *revts;
86
86
  REVT_INFO *revtis;
87
87
  /*
88
88
    Time type which is used for times smaller than first transition or if
116
116
 
117
117
 
118
118
/*
119
 
  Converts time from my_time_t representation (seconds in UTC since Epoch)
 
119
  Converts time from time_t representation (seconds in UTC since Epoch)
120
120
  to broken down representation using given local time zone offset.
121
121
 
122
122
  SYNOPSIS
123
123
    sec_to_TIME()
124
124
      tmp    - pointer to structure for broken down representation
125
 
      t      - my_time_t value to be converted
 
125
      t      - time_t value to be converted
126
126
      offset - local time zone offset
127
127
 
128
128
  DESCRIPTION
129
 
    Convert my_time_t with offset to DRIZZLE_TIME struct. Differs from timesub
 
129
    Convert time_t with offset to DRIZZLE_TIME struct. Differs from timesub
130
130
    (from elsie code) because doesn't contain any leap correction and
131
131
    TM_GMTOFF and is_dst setting and contains some MySQL specific
132
132
    initialization. Funny but with removing of these we almost have
133
133
    glibc's offtime function.
134
134
*/
135
135
static void
136
 
sec_to_TIME(DRIZZLE_TIME * tmp, my_time_t t, long offset)
 
136
sec_to_TIME(DRIZZLE_TIME * tmp, time_t t, long offset)
137
137
{
138
138
  long days;
139
139
  long rem;
146
146
 
147
147
  /*
148
148
    We do this as separate step after dividing t, because this
149
 
    allows us handle times near my_time_t bounds without overflows.
 
149
    allows us handle times near time_t bounds without overflows.
150
150
  */
151
151
  rem+= offset;
152
152
  while (rem < 0)
196
196
 
197
197
 
198
198
/*
199
 
  Find time range wich contains given my_time_t value
 
199
  Find time range wich contains given time_t value
200
200
 
201
201
  SYNOPSIS
202
202
    find_time_range()
203
 
      t                - my_time_t value for which we looking for range
 
203
      t                - time_t value for which we looking for range
204
204
      range_boundaries - sorted array of range starts.
205
205
      higher_bound     - number of ranges
206
206
 
207
207
  DESCRIPTION
208
 
    Performs binary search for range which contains given my_time_t value.
209
 
    It has sense if number of ranges is greater than zero and my_time_t value
 
208
    Performs binary search for range which contains given time_t value.
 
209
    It has sense if number of ranges is greater than zero and time_t value
210
210
    is greater or equal than beginning of first range. It also assumes that
211
 
    t belongs to some range specified or end of last is MY_TIME_T_MAX.
 
211
    t belongs to some range specified.
212
212
 
213
213
    With this localtime_r on real data may takes less time than with linear
214
214
    search (I've seen 30% speed up).
217
217
    Index of range to which t belongs
218
218
*/
219
219
static uint
220
 
find_time_range(my_time_t t, const my_time_t *range_boundaries,
 
220
find_time_range(time_t t, const time_t *range_boundaries,
221
221
                uint32_t higher_bound)
222
222
{
223
223
  uint32_t i, lower_bound= 0;
246
246
}
247
247
 
248
248
/*
249
 
  Find local time transition for given my_time_t.
 
249
  Find local time transition for given time_t.
250
250
 
251
251
  SYNOPSIS
252
252
    find_transition_type()
253
 
      t   - my_time_t value to be converted
 
253
      t   - time_t value to be converted
254
254
      sp  - pointer to struct with time zone description
255
255
 
256
256
  RETURN VALUE
257
257
    Pointer to structure in time zone description describing
258
 
    local time type for given my_time_t.
 
258
    local time type for given time_t.
259
259
*/
260
260
static
261
261
const TRAN_TYPE_INFO *
262
 
find_transition_type(my_time_t t, const TIME_ZONE_INFO *sp)
 
262
find_transition_type(time_t t, const TIME_ZONE_INFO *sp)
263
263
{
264
264
  if (unlikely(sp->timecnt == 0 || t < sp->ats[0]))
265
265
  {
280
280
 
281
281
 
282
282
/*
283
 
  Converts time in my_time_t representation (seconds in UTC since Epoch) to
 
283
  Converts time in time_t representation (seconds in UTC since Epoch) to
284
284
  broken down DRIZZLE_TIME representation in local time zone.
285
285
 
286
286
  SYNOPSIS
287
287
    gmt_sec_to_TIME()
288
288
      tmp          - pointer to structure for broken down represenatation
289
 
      sec_in_utc   - my_time_t value to be converted
 
289
      sec_in_utc   - time_t value to be converted
290
290
      sp           - pointer to struct with time zone description
291
291
 
292
292
  TODO
296
296
    (60th and 61st second, look how we calculate them as "hit" in this
297
297
    function).
298
298
    Under realistic assumptions about frequency of transitions the same array
299
 
    can be used fot DRIZZLE_TIME -> my_time_t conversion. For this we need to
 
299
    can be used for DRIZZLE_TIME -> time_t conversion. For this we need to
300
300
    implement tweaked binary search which will take into account that some
301
 
    DRIZZLE_TIME has two matching my_time_t ranges and some of them have none.
 
301
    DRIZZLE_TIME has two matching time_t ranges and some of them have none.
302
302
*/
303
303
static void
304
304
gmt_sec_to_TIME(DRIZZLE_TIME *tmp, time_t sec_in_utc, const TIME_ZONE_INFO *sp)
357
357
 
358
358
/*
359
359
  Converts local time in broken down representation to local
360
 
  time zone analog of my_time_t represenation.
 
360
  time zone analog of time_t represenation.
361
361
 
362
362
  SYNOPSIS
363
363
    sec_since_epoch()
364
364
      year, mon, mday, hour, min, sec - broken down representation.
365
365
 
366
366
  DESCRIPTION
367
 
    Converts time in broken down representation to my_time_t representation
 
367
    Converts time in broken down representation to time_t representation
368
368
    ignoring time zone. Note that we cannot convert back some valid _local_
369
 
    times near ends of my_time_t range because of my_time_t  overflow. But we
 
369
    times near ends of time_t range because of time_t overflow. But we
370
370
    ignore this fact now since MySQL will never pass such argument.
371
371
 
372
372
  RETURN VALUE
373
373
    Seconds since epoch time representation.
374
374
*/
375
 
static my_time_t
 
375
static time_t
376
376
sec_since_epoch(int year, int mon, int mday, int hour, int min ,int sec)
377
377
{
378
 
  /* Guard against my_time_t overflow(on system with 32 bit my_time_t) */
 
378
  /* Guard against time_t overflow (on system with 32 bit time_t) */
379
379
  assert(!(year == TIMESTAMP_MAX_YEAR && mon == 1 && mday > 17));
380
380
#ifndef WE_WANT_TO_HANDLE_UNORMALIZED_DATES
381
381
  /*
403
403
}
404
404
 
405
405
/*
406
 
  Converts local time in broken down DRIZZLE_TIME representation to my_time_t
 
406
  Converts local time in broken down DRIZZLE_TIME representation to time_t
407
407
  representation.
408
408
 
409
409
  SYNOPSIS
421
421
      has two answers it will give the smaller one
422
422
    - If we are in spring time gap then it will return
423
423
      beginning of the gap
424
 
    - It can give wrong results near the ends of my_time_t due to
 
424
    - It can give wrong results near the ends of time_t due to
425
425
      overflows, but we are safe since in MySQL we will never
426
426
      call this function for such dates (its restriction for year
427
427
      between 1970 and 2038 gives us several days of reserve).
445
445
 
446
446
    We use completely different approach. It is better since it is both
447
447
    faster than iterative implementations and fully determenistic. If you
448
 
    look at my_time_t to DRIZZLE_TIME conversion then you'll find that it consist
 
448
    look at time_t to DRIZZLE_TIME conversion then you'll find that it consist
449
449
    of two steps:
450
 
    The first is calculating shifted my_time_t value and the second - TIME
451
 
    calculation from shifted my_time_t value (well it is a bit simplified
452
 
    picture). The part in which we are interested in is my_time_t -> shifted
453
 
    my_time_t conversion. It is piecewise linear function which is defined
 
450
    The first is calculating shifted time_t value and the second - TIME
 
451
    calculation from shifted time_t value (well it is a bit simplified
 
452
    picture). The part in which we are interested in is time_t -> shifted
 
453
    time_t conversion. It is piecewise linear function which is defined
454
454
    by combination of transition times as break points and times offset
455
455
    as changing function parameter. The possible inverse function for this
456
456
    converison would be ambiguos but with MySQL's restrictions we can use
457
457
    some function which is the same as inverse function on unambigiuos
458
458
    ranges and coincides with one of branches of inverse function in
459
459
    other ranges. Thus we just need to build table which will determine
460
 
    this shifted my_time_t -> my_time_t conversion similar to existing
461
 
    (my_time_t -> shifted my_time_t table). We do this in
 
460
    this shifted time_t -> time_t conversion similar to existing
 
461
    (time_t -> shifted time_t table). We do this in
462
462
    prepare_tz_info function.
463
463
 
464
464
  TODO
474
474
    Seconds in UTC since Epoch.
475
475
    0 in case of error.
476
476
*/
477
 
static my_time_t
 
477
static time_t
478
478
TIME_to_gmt_sec(const DRIZZLE_TIME *t, const TIME_ZONE_INFO *sp,
479
479
                bool *in_dst_time_gap)
480
480
{
481
 
  my_time_t local_t;
 
481
  time_t local_t;
482
482
  uint32_t saved_seconds;
483
483
  uint32_t i;
484
484
  int shift= 0;
494
494
    saved_seconds= t->second;
495
495
 
496
496
  /*
497
 
    NOTE: to convert full my_time_t range we do a shift of the
498
 
    boundary dates here to avoid overflow of my_time_t.
 
497
    NOTE: to convert full time_t range we do a shift of the
 
498
    boundary dates here to avoid overflow of time_t.
499
499
    We use alike approach in my_system_gmt_sec().
500
500
 
501
501
    However in that function we also have to take into account
526
526
  if (local_t < sp->revts[0] || local_t > sp->revts[sp->revcnt])
527
527
  {
528
528
    /*
529
 
      This means that source time can't be represented as my_time_t due to
530
 
      limited my_time_t range.
 
529
      This means that source time can't be represented as time_t due to
 
530
      limited time_t range.
531
531
    */
532
532
    return(0);
533
533
  }
542
542
  */
543
543
  if (shift)
544
544
  {
545
 
    if (local_t > (my_time_t) (TIMESTAMP_MAX_VALUE - shift * SECS_PER_DAY +
546
 
                               sp->revtis[i].rt_offset - saved_seconds))
 
545
    if (local_t > (time_t) (TIMESTAMP_MAX_VALUE - shift * SECS_PER_DAY +
 
546
                            sp->revtis[i].rt_offset - saved_seconds))
547
547
    {
548
 
      return(0);                           /* my_time_t overflow */
 
548
      return(0);                           /* time_t overflow */
549
549
    }
550
550
    local_t+= shift * SECS_PER_DAY;
551
551
  }
555
555
    /*
556
556
      Oops! We are in spring time gap.
557
557
      May be we should return error here?
558
 
      Now we are returning my_time_t value corresponding to the
 
558
      Now we are returning time_t value corresponding to the
559
559
      beginning of the gap.
560
560
    */
561
561
    *in_dst_time_gap= 1;
598
598
{
599
599
public:
600
600
  Time_zone_system() {}                       /* Remove gcc warning */
601
 
  virtual my_time_t TIME_to_gmt_sec(const DRIZZLE_TIME *t,
 
601
  virtual time_t TIME_to_gmt_sec(const DRIZZLE_TIME *t,
602
602
                                    bool *in_dst_time_gap) const;
603
 
  virtual void gmt_sec_to_TIME(DRIZZLE_TIME *tmp, my_time_t t) const;
 
603
  virtual void gmt_sec_to_TIME(DRIZZLE_TIME *tmp, time_t t) const;
604
604
  virtual const String * get_name() const;
605
605
};
606
606
 
607
607
 
608
608
/*
609
609
  Converts local time in system time zone in DRIZZLE_TIME representation
610
 
  to its my_time_t representation.
 
610
  to its time_t representation.
611
611
 
612
612
  SYNOPSIS
613
613
    TIME_to_gmt_sec()
619
619
 
620
620
  DESCRIPTION
621
621
    This method uses system function (localtime_r()) for conversion
622
 
    local time in system time zone in DRIZZLE_TIME structure to its my_time_t
 
622
    local time in system time zone in DRIZZLE_TIME structure to its time_t
623
623
    representation. Unlike the same function for Time_zone_db class
624
624
    it it won't handle unnormalized input properly. Still it will
625
 
    return lowest possible my_time_t in case of ambiguity or if we
 
625
    return lowest possible time_t in case of ambiguity or if we
626
626
    provide time corresponding to the time-gap.
627
627
 
628
628
    You should call init_time() function before using this function.
629
629
 
630
630
  RETURN VALUE
631
 
    Corresponding my_time_t value or 0 in case of error
 
631
    Corresponding time_t value or 0 in case of error
632
632
*/
633
 
my_time_t
 
633
time_t
634
634
Time_zone_system::TIME_to_gmt_sec(const DRIZZLE_TIME *t, bool *in_dst_time_gap) const
635
635
{
636
636
  long not_used;
639
639
 
640
640
 
641
641
/*
642
 
  Converts time from UTC seconds since Epoch (my_time_t) representation
 
642
  Converts time from UTC seconds since Epoch (time_t) representation
643
643
  to system local time zone broken-down representation.
644
644
 
645
645
  SYNOPSIS
646
646
    gmt_sec_to_TIME()
647
647
      tmp - pointer to DRIZZLE_TIME structure to fill-in
648
 
      t   - my_time_t value to be converted
 
648
      t   - time_t value to be converted
649
649
 
650
650
  NOTE
651
651
    We assume that value passed to this function will fit into time_t range
655
655
    the 1902 easily.
656
656
*/
657
657
void
658
 
Time_zone_system::gmt_sec_to_TIME(DRIZZLE_TIME *tmp, my_time_t t) const
 
658
Time_zone_system::gmt_sec_to_TIME(DRIZZLE_TIME *tmp, time_t t) const
659
659
{
660
660
  struct tm tmp_tm;
661
661
  time_t tmp_t= (time_t)t;
685
685
/*
686
686
  Instance of this class represents UTC time zone. It uses system gmtime_r
687
687
  function for conversions and is always available. It is used only for
688
 
  my_time_t -> DRIZZLE_TIME conversions in various UTC_...  functions, it is not
689
 
  intended for DRIZZLE_TIME -> my_time_t conversions and shouldn't be exposed to user.
 
688
  time_t -> DRIZZLE_TIME conversions in various UTC_...  functions, it is not
 
689
  intended for DRIZZLE_TIME -> time_t conversions and shouldn't be exposed to user.
690
690
*/
691
691
class Time_zone_utc : public Time_zone
692
692
{
693
693
public:
694
694
  Time_zone_utc() {}                          /* Remove gcc warning */
695
 
  virtual my_time_t TIME_to_gmt_sec(const DRIZZLE_TIME *t,
 
695
  virtual time_t TIME_to_gmt_sec(const DRIZZLE_TIME *t,
696
696
                                    bool *in_dst_time_gap) const;
697
 
  virtual void gmt_sec_to_TIME(DRIZZLE_TIME *tmp, my_time_t t) const;
 
697
  virtual void gmt_sec_to_TIME(DRIZZLE_TIME *tmp, time_t t) const;
698
698
  virtual const String * get_name() const;
699
699
};
700
700
 
701
701
 
702
702
/*
703
 
  Convert UTC time from DRIZZLE_TIME representation to its my_time_t representation.
 
703
  Convert UTC time from DRIZZLE_TIME representation to its time_t representation.
704
704
 
705
705
  SYNOPSIS
706
706
    TIME_to_gmt_sec()
711
711
                        spring time-gap) and is not touched otherwise.
712
712
 
713
713
  DESCRIPTION
714
 
    Since Time_zone_utc is used only internally for my_time_t -> TIME
 
714
    Since Time_zone_utc is used only internally for time_t -> TIME
715
715
    conversions, this function of Time_zone interface is not implemented for
716
716
    this class and should not be called.
717
717
 
718
718
  RETURN VALUE
719
719
    0
720
720
*/
721
 
my_time_t
 
721
time_t
722
722
Time_zone_utc::TIME_to_gmt_sec(const DRIZZLE_TIME *t __attribute__((unused)),
723
723
                               bool *in_dst_time_gap __attribute__((unused))) const
724
724
{
729
729
 
730
730
 
731
731
/*
732
 
  Converts time from UTC seconds since Epoch (my_time_t) representation
 
732
  Converts time from UTC seconds since Epoch (time_t) representation
733
733
  to broken-down representation (also in UTC).
734
734
 
735
735
  SYNOPSIS
736
736
    gmt_sec_to_TIME()
737
737
      tmp - pointer to DRIZZLE_TIME structure to fill-in
738
 
      t   - my_time_t value to be converted
 
738
      t   - time_t value to be converted
739
739
 
740
740
  NOTE
741
741
    See note for apropriate Time_zone_system method.
742
742
*/
743
743
void
744
 
Time_zone_utc::gmt_sec_to_TIME(DRIZZLE_TIME *tmp, my_time_t t) const
 
744
Time_zone_utc::gmt_sec_to_TIME(DRIZZLE_TIME *tmp, time_t t) const
745
745
{
746
746
  struct tm tmp_tm;
747
747
  time_t tmp_t= (time_t)t;
782
782
{
783
783
public:
784
784
  Time_zone_db(TIME_ZONE_INFO *tz_info_arg, const String * tz_name_arg);
785
 
  virtual my_time_t TIME_to_gmt_sec(const DRIZZLE_TIME *t,
 
785
  virtual time_t TIME_to_gmt_sec(const DRIZZLE_TIME *t,
786
786
                                    bool *in_dst_time_gap) const;
787
 
  virtual void gmt_sec_to_TIME(DRIZZLE_TIME *tmp, my_time_t t) const;
 
787
  virtual void gmt_sec_to_TIME(DRIZZLE_TIME *tmp, time_t t) const;
788
788
  virtual const String * get_name() const;
789
789
private:
790
790
  TIME_ZONE_INFO *tz_info;
814
814
 
815
815
/*
816
816
  Converts local time in time zone described from TIME
817
 
  representation to its my_time_t representation.
 
817
  representation to its time_t representation.
818
818
 
819
819
  SYNOPSIS
820
820
    TIME_to_gmt_sec()
829
829
    parameter restrictions.
830
830
 
831
831
  RETURN VALUE
832
 
    Corresponding my_time_t value or 0 in case of error
 
832
    Corresponding time_t value or 0 in case of error
833
833
*/
834
 
my_time_t
 
834
time_t
835
835
Time_zone_db::TIME_to_gmt_sec(const DRIZZLE_TIME *t, bool *in_dst_time_gap) const
836
836
{
837
837
  return ::TIME_to_gmt_sec(t, tz_info, in_dst_time_gap);
839
839
 
840
840
 
841
841
/*
842
 
  Converts time from UTC seconds since Epoch (my_time_t) representation
 
842
  Converts time from UTC seconds since Epoch (time_t) representation
843
843
  to local time zone described in broken-down representation.
844
844
 
845
845
  SYNOPSIS
846
846
    gmt_sec_to_TIME()
847
847
      tmp - pointer to DRIZZLE_TIME structure to fill-in
848
 
      t   - my_time_t value to be converted
 
848
      t   - time_t value to be converted
849
849
*/
850
850
void
851
 
Time_zone_db::gmt_sec_to_TIME(DRIZZLE_TIME *tmp, my_time_t t) const
 
851
Time_zone_db::gmt_sec_to_TIME(DRIZZLE_TIME *tmp, time_t t) const
852
852
{
853
853
  ::gmt_sec_to_TIME(tmp, t, tz_info);
854
854
}
878
878
{
879
879
public:
880
880
  Time_zone_offset(long tz_offset_arg);
881
 
  virtual my_time_t TIME_to_gmt_sec(const DRIZZLE_TIME *t,
 
881
  virtual time_t TIME_to_gmt_sec(const DRIZZLE_TIME *t,
882
882
                                    bool *in_dst_time_gap) const;
883
 
  virtual void   gmt_sec_to_TIME(DRIZZLE_TIME *tmp, my_time_t t) const;
 
883
  virtual void   gmt_sec_to_TIME(DRIZZLE_TIME *tmp, time_t t) const;
884
884
  virtual const String * get_name() const;
885
885
  /*
886
886
    This have to be public because we want to be able to access it from
915
915
 
916
916
/*
917
917
  Converts local time in time zone described as offset from UTC
918
 
  from DRIZZLE_TIME representation to its my_time_t representation.
 
918
  from DRIZZLE_TIME representation to its time_t representation.
919
919
 
920
920
  SYNOPSIS
921
921
    TIME_to_gmt_sec()
928
928
                        It is not really used in this class.
929
929
 
930
930
  RETURN VALUE
931
 
    Corresponding my_time_t value or 0 in case of error
 
931
    Corresponding time_t value or 0 in case of error
932
932
*/
933
 
my_time_t
 
933
time_t
934
934
Time_zone_offset::TIME_to_gmt_sec(const DRIZZLE_TIME *t,
935
935
                                  bool *in_dst_time_gap __attribute__((unused))) const
936
936
{
937
 
  my_time_t local_t;
 
937
  time_t local_t;
938
938
  int shift= 0;
939
939
 
940
940
  /*
946
946
 
947
947
  /*
948
948
    Do a temporary shift of the boundary dates to avoid
949
 
    overflow of my_time_t if the time value is near it's
 
949
    overflow of time_t if the time value is near it's
950
950
    maximum range
951
951
  */
952
952
  if ((t->year == TIMESTAMP_MAX_YEAR) && (t->month == 1) && t->day > 4)
971
971
 
972
972
 
973
973
/*
974
 
  Converts time from UTC seconds since Epoch (my_time_t) representation
 
974
  Converts time from UTC seconds since Epoch (time_t) representation
975
975
  to local time zone described as offset from UTC and in broken-down
976
976
  representation.
977
977
 
978
978
  SYNOPSIS
979
979
    gmt_sec_to_TIME()
980
980
      tmp - pointer to DRIZZLE_TIME structure to fill-in
981
 
      t   - my_time_t value to be converted
 
981
      t   - time_t value to be converted
982
982
*/
983
983
void
984
 
Time_zone_offset::gmt_sec_to_TIME(DRIZZLE_TIME *tmp, my_time_t t) const
 
984
Time_zone_offset::gmt_sec_to_TIME(DRIZZLE_TIME *tmp, time_t t) const
985
985
{
986
986
  sec_to_TIME(tmp, t, offset);
987
987
}