mirror of
https://github.com/MariaDB/server.git
synced 2026-05-02 13:15:32 +02:00
- removed several C++-style comments (//) - these confuse the IBM
compiler
This commit is contained in:
parent
0eb016bb9b
commit
84e2df6de2
1 changed files with 5 additions and 5 deletions
|
|
@ -680,12 +680,12 @@ my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, bool *in_dst_time_gap)
|
||||||
/* Get difference in days */
|
/* Get difference in days */
|
||||||
int days= t->day - l_time->tm_mday;
|
int days= t->day - l_time->tm_mday;
|
||||||
if (days < -1)
|
if (days < -1)
|
||||||
days= 1; // Month has wrapped
|
days= 1; /* Month has wrapped */
|
||||||
else if (days > 1)
|
else if (days > 1)
|
||||||
days= -1;
|
days= -1;
|
||||||
diff=(3600L*(long) (days*24+((int) t->hour - (int) l_time->tm_hour)) +
|
diff=(3600L*(long) (days*24+((int) t->hour - (int) l_time->tm_hour)) +
|
||||||
(long) (60*((int) t->minute - (int) l_time->tm_min)));
|
(long) (60*((int) t->minute - (int) l_time->tm_min)));
|
||||||
current_timezone+= diff+3600; // Compensate for -3600 above
|
current_timezone+= diff+3600; /* Compensate for -3600 above */
|
||||||
tmp+= (time_t) diff;
|
tmp+= (time_t) diff;
|
||||||
localtime_r(&tmp,&tm_tmp);
|
localtime_r(&tmp,&tm_tmp);
|
||||||
l_time=&tm_tmp;
|
l_time=&tm_tmp;
|
||||||
|
|
@ -698,15 +698,15 @@ my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, bool *in_dst_time_gap)
|
||||||
{
|
{
|
||||||
int days= t->day - l_time->tm_mday;
|
int days= t->day - l_time->tm_mday;
|
||||||
if (days < -1)
|
if (days < -1)
|
||||||
days=1; // Month has wrapped
|
days=1; /* Month has wrapped */
|
||||||
else if (days > 1)
|
else if (days > 1)
|
||||||
days= -1;
|
days= -1;
|
||||||
diff=(3600L*(long) (days*24+((int) t->hour - (int) l_time->tm_hour))+
|
diff=(3600L*(long) (days*24+((int) t->hour - (int) l_time->tm_hour))+
|
||||||
(long) (60*((int) t->minute - (int) l_time->tm_min)));
|
(long) (60*((int) t->minute - (int) l_time->tm_min)));
|
||||||
if (diff == 3600)
|
if (diff == 3600)
|
||||||
tmp+=3600 - t->minute*60 - t->second; // Move to next hour
|
tmp+=3600 - t->minute*60 - t->second; /* Move to next hour */
|
||||||
else if (diff == -3600)
|
else if (diff == -3600)
|
||||||
tmp-=t->minute*60 + t->second; // Move to previous hour
|
tmp-=t->minute*60 + t->second; /* Move to previous hour */
|
||||||
|
|
||||||
*in_dst_time_gap= 1;
|
*in_dst_time_gap= 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue