Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fpletz
firmware
Commits
54177a70
Verified
Commit
54177a70
authored
5 years ago
by
fpletz
Browse files
Options
Downloads
Patches
Plain Diff
fix(utime.c): set_time should operate in local tz
Needed due to changes from
c7f59d3e
. cc !146
parent
8c59935e
No related branches found
No related tags found
No related merge requests found
Pipeline
#2614
failed
5 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Documentation/pycardium/utime.rst
+4
-2
4 additions, 2 deletions
Documentation/pycardium/utime.rst
pycardium/modules/utime.c
+1
-1
1 addition, 1 deletion
pycardium/modules/utime.c
with
5 additions
and
3 deletions
Documentation/pycardium/utime.rst
+
4
−
2
View file @
54177a70
...
...
@@ -25,11 +25,13 @@ alarm.
.. py:function:: time()
Return the current timestamp in seconds since 2000-01-01 00:00.
Return the current timestamp in seconds since 2000-01-01 00:00 in
the local timezone.
.. py:function:: set_time(secs)
Sets the time to ``secs`` seconds since 2000-01-01 00:00.
Sets the time to ``secs`` seconds since 2000-01-01 00:00 in the local
timezone.
.. py:function:: set_unix_time(secs)
...
...
This diff is collapsed.
Click to expand it.
pycardium/modules/utime.c
+
1
−
1
View file @
54177a70
...
...
@@ -20,7 +20,7 @@
static
mp_obj_t
time_set_time
(
mp_obj_t
secs
)
{
uint64_t
timestamp
=
mp_obj_get_int
(
secs
)
*
1000ULL
+
EPOCH_OFFSET
*
1000ULL
;
mp_obj_get_int
(
secs
)
*
1000ULL
+
EPOCH_OFFSET
*
1000ULL
+
TZONE_OFFSET
;
epic_rtc_set_milliseconds
(
timestamp
);
return
mp_const_none
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment