-
Notifications
You must be signed in to change notification settings - Fork 72
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
ffi: Add support for specifying UTC offset changes in an IR stream. #386
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file has been refactored to reduce code duplication. However, it contains many legacy codes, such as using static
functions. We should refactor things in another PR.
Can we modify the timestamp offset to either milliseconds? There are multiple benefits for storing offset in higher precision.
|
@kirkrodrigues Do you think we should add a field for UTC offset in |
Fixed |
Sgtm |
Done |
epoch_time_ms_t preamble_ts = get_current_ts(); | ||
constexpr char timestamp_pattern[] = "%Y-%m-%d %H:%M:%S,%3"; | ||
constexpr char timestamp_pattern_syntax[] = "yyyy-MM-dd HH:mm:ss"; | ||
constexpr char time_zone_id[] = "Asia/Tokyo"; | ||
REQUIRE(serialize_preamble<TestType>( | ||
timestamp_pattern, | ||
timestamp_pattern_syntax, | ||
time_zone_id, | ||
preamble_ts, | ||
ir_buf | ||
)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we deduplicate this as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In decode_ir_complete
, we need to use these variables for comparison. I would prefer to leave them verbose
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few things I forgot to post in the last review.
Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com>
References
Description
In the current IR format, the timezone information is specified at the beginning of the stream in the metadata, represented using IANA timezone ID. However, this format doesn't allow users to change the timezone in a stream. Therefore, this PR makes the following changes as a solution:
Note:
Validation performed
Note:
clang-tidy
isn't fully applied since these files contain code using old styles.