Skip to content

Add unit specifier support for UTC offset and timestamp parsing in decoder options #100

Description

@coderabbitai

Feature Request

Add support for unit specifiers in decoder options to allow developers to specify the units for UTC offset and timestamp fields when parsing IR files.

Context

Currently, the decoder assumes specific units for time-related fields:

  • UTC offsets may be stored in seconds but JS libraries typically expect minutes
  • Timestamps have similar unit assumption challenges

Proposed Solution

Add unit specifier options to the decoder configuration, such as:

  • unit="h"/"m"/"s" for hour/minute/second units
  • unitInMillis=3,600,000/60,000/1,000 for specifying units in milliseconds

This should apply to both:

  • UTC offset parsing
  • Timestamp parsing

References

Requested by: @hoophalab

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions