Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
9fac49b2
Commit
9fac49b2
authored
Aug 03, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- removed several C++-style comments (//) - these confuse the IBM
compiler
parent
201f8d36
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
sql-common/my_time.c
sql-common/my_time.c
+5
-5
No files found.
sql-common/my_time.c
View file @
9fac49b2
...
...
@@ -680,12 +680,12 @@ my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, bool *in_dst_time_gap)
/* Get difference in days */
int
days
=
t
->
day
-
l_time
->
tm_mday
;
if
(
days
<
-
1
)
days
=
1
;
/
/ Month has wrapped
days
=
1
;
/
* Month has wrapped */
else
if
(
days
>
1
)
days
=
-
1
;
diff
=
(
3600L
*
(
long
)
(
days
*
24
+
((
int
)
t
->
hour
-
(
int
)
l_time
->
tm_hour
))
+
(
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
;
localtime_r
(
&
tmp
,
&
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
;
if
(
days
<
-
1
)
days
=
1
;
/
/ Month has wrapped
days
=
1
;
/
* Month has wrapped */
else
if
(
days
>
1
)
days
=
-
1
;
diff
=
(
3600L
*
(
long
)
(
days
*
24
+
((
int
)
t
->
hour
-
(
int
)
l_time
->
tm_hour
))
+
(
long
)
(
60
*
((
int
)
t
->
minute
-
(
int
)
l_time
->
tm_min
)));
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
)
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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment