Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start_time Function Returning Date Out of Standard Format #1016

Open
MatheusFreitas25 opened this issue May 8, 2024 · 0 comments
Open

start_time Function Returning Date Out of Standard Format #1016

MatheusFreitas25 opened this issue May 8, 2024 · 0 comments

Comments

@MatheusFreitas25
Copy link

Python version

('python=3.11.2 (v3.11.2:878ead1ac1, Feb 7 2023, 10:02:41) [Clang 13.0.0 '
'(clang-1300.0.29.30)]')
'os=macOS-14.0-arm64-arm-64bit'
'numpy=1.26.4'
'asammdf=7.3.16'

MDF version

4.10

Code snippet

mdf_start_time = mdf.start_time
print(mdf_start_time) -> 2024-04-17 11:21:39+02:00
start_time_utc = mdf_start_time.astimezone(pytz.utc)
print(start_time_utc) -> 2024-04-17 09:21:39+00:00

Description

We have an MF4 file where the Data date/time in the header is:

Data date/time: 17.04.2024 13:09:32

When running the above code, I find that the start time is:

2024-04-17 11:21:39+02:00

where I believe the minute 21 is the first signal record (perhaps).

The issue is that following the ISO 8601 standard, Python and other languages will interpret this date as UTC:

2024-04-17 09:21:39+00:00

So, I believe that in reality, the start time should return:

2024-04-17 13:21:39+02:00

And when converted to UTC, it would be:

2024-04-17 11:21:39+00:00

@MatheusFreitas25 MatheusFreitas25 changed the title start_time Function Returns Date Out of Standard Format? Is the start_time Function Returning Date Out of Standard Format? May 8, 2024
@MatheusFreitas25 MatheusFreitas25 changed the title Is the start_time Function Returning Date Out of Standard Format? start_time Function Returning Date Out of Standard Format May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant