Fix_#1343: Correctly Store YouTube Video Publish Date with Timezone Support #2114
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR resolves the issue where the publish date of YouTube videos was being stored as YYYY-MM-DD 00:00:00, without the time component. This caused issues when handling time zones. The fix ensures the publish date is stored with the correct time and in ISO 8601 format.
Fixes # (1343)
file: embedchain/loaders/youtube_video.py
Type of change
How Has This Been Tested?
Updated code to convert publishedAt timestamp to ISO 8601 format.
Validated that timestamps are now stored with time and timezone, e.g., 2024-04-15T15:00:00Z.
Manually tested the following cases:
* Correct conversion for UTC (Z suffix) timestamps.
* Conversion for time zone-aware timestamps (e.g., +02:00).
* Ensured any invalid timestamps are logged with a warning.
Checklist:
Maintainer Checklist