Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libmtime
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
icon-libraries
libmtime
Merge requests
!7
1.0.10 Python: 2 to 3, (dt,dt) / td division, mtime object interface
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
1.0.10 Python: 2 to 3, (dt,dt) / td division, mtime object interface
1.0.10-python-2to3-dt_dt_td_division-mtime
into
master
Overview
2
Commits
8
Pipelines
0
Changes
1
Merged
Karl-Hermann Wieners
requested to merge
1.0.10-python-2to3-dt_dt_td_division-mtime
into
master
4 years ago
Overview
2
Commits
8
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Viewing commit
461c3571
Prev
Next
Show latest version
1 file
+
4
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
461c3571
Added missing decoding from bytes to string in Python object interface
· 461c3571
Karl-Hermann Wieners
authored
4 years ago
src/mtime.py
+
4
−
3
Options
@@ -17,7 +17,8 @@ def setCalendar(calendar_type):
libmtime
.
resetCalendar
()
libmtime
.
setCalendar
(
calendar_type
)
calendarToString
=
libmtime
.
calendarToString
def
calendarToString
():
return
libmtime
.
calendarToString
().
decode
()
class
MTime
(
object
):
'''
\
@@ -87,10 +88,10 @@ class DateTime (MTime):
return
self
.
_my
@property
def
date
(
self
):
return
Date
(
libmtime
.
dateToString
(
ctypes
.
byref
(
self
.
_my
.
contents
.
date
)))
return
Date
(
libmtime
.
dateToString
(
ctypes
.
byref
(
self
.
_my
.
contents
.
date
))
.
decode
()
)
@property
def
time
(
self
):
return
Time
(
libmtime
.
timeToString
(
ctypes
.
byref
(
self
.
_my
.
contents
.
time
)))
return
Time
(
libmtime
.
timeToString
(
ctypes
.
byref
(
self
.
_my
.
contents
.
time
))
.
decode
()
)
class
TimeDelta
(
MTime
):
def
__init__
(
self
,
spec
):
Loading