Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
fwatch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
8
Issues
8
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
fwatch
Commits
06d30f35
Commit
06d30f35
authored
Oct 08, 2014
by
Projects
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set_date: Fixed setting years.
parent
10ac8402
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
set_date.c
sw/freertos/src/apps/settings/set_date.c
+5
-1
No files found.
sw/freertos/src/apps/settings/set_date.c
View file @
06d30f35
...
...
@@ -117,7 +117,11 @@ static void save(void)
time
.
tm_mday
=
sb_digit
(
D1
)
*
10
+
sb_digit
(
D2
);
time
.
tm_mon
=
sb_digit
(
M1
)
*
10
+
sb_digit
(
M2
)
-
1
;
time
.
tm_year
=
sb_digit
(
Y1
)
*
10
+
sb_digit
(
Y2
)
+
100
;
time
.
tm_year
=
sb_digit
(
Y1
)
*
10
+
sb_digit
(
Y2
);
// year ending with a number lower than 70 should be 20xx
if
(
time
.
tm_year
<
70
)
time
.
tm_year
+=
100
;
clock_set_time
(
&
time
);
}
...
...
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