Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ICARTT Python Package
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
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
MBEES
ICARTT Python Package
Commits
21672649
Commit
21672649
authored
3 years ago
by
Florian Obersteiner
Browse files
Options
Downloads
Patches
Plain Diff
datetime object creation from unpacked int generator
parent
2c56e1a3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!6
code refactor
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/icartt/dataset.py
+2
-6
2 additions, 6 deletions
src/icartt/dataset.py
with
2 additions
and
6 deletions
src/icartt/dataset.py
+
2
−
6
View file @
21672649
...
...
@@ -520,12 +520,8 @@ class Dataset:
# line 7 - UTC date when data begin, UTC date of data reduction or revision
# - comma delimited (yyyy, mm, dd, yyyy, mm, dd).
dmp
=
f
.
readline
()
self
.
dateOfCollection
=
datetime
.
datetime
.
strptime
(
""
.
join
([
"
{:s}
"
.
format
(
x
)
for
x
in
dmp
[:
3
]]),
"
%Y%m%d
"
)
self
.
dateOfRevision
=
datetime
.
datetime
.
strptime
(
""
.
join
([
"
{:s}
"
.
format
(
x
)
for
x
in
dmp
[
3
:
6
]]),
"
%Y%m%d
"
)
self
.
dateOfCollection
=
datetime
.
datetime
(
*
map
(
int
,
dmp
[:
3
]))
# TODO: set UTC ?!
self
.
dateOfRevision
=
datetime
.
datetime
(
*
map
(
int
,
dmp
[
3
:
6
]))
# line 8 - Data Interval (This value describes the time spacing (in seconds)
# between consecutive data records. It is the (constant) interval between
...
...
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