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

Update Dockerfile TZ env variable #182

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ovargasp
Copy link

@ovargasp ovargasp commented Dec 6, 2024

Makes Dockerfile use the TZ env variable from compose.yml file to set the timezone of the container, as it is it uses UTC even if that variable is set to a different timezone.

Makes Dockerfile to use the env variable from compose.yml file to set the timezone of the container, as it is it uses UTC even if TZ is set in to a different timezone.
@rocky4546
Copy link
Contributor

I see no issue with change. Two questions:
First, does this impact when daylight saving time happens. the purpose of having stuff on UTC is to allow for daylight savings time to adjust within each timezone independently.
Second, There are 3 Dockerfile files. I thought the main one is Dockerfile_tvh_crypt.alpine, but not a docker expert. wondering if all 3 should see an update.

@ovargasp
Copy link
Author

ovargasp commented Dec 9, 2024

For what I've read of the code

dt_utc = utils.convert_to_utc(dt)
cabernet converts all dates to utc to create the epg in the xmltv.py, so it shouldn't affect daylight saving settings. Besides the only thing it does is enable the TZ variable in the container you can set the TZ value to UTC and it'll work the same.

As for the Dockerfile, it depends on cabernet github's configured workflow to create the docker image,

name: Build & Push Cabernet
it creates an image from master and dev branches using the Dockerfile definition, the other 2 Dockerfiles aren't refered by any other workflow nor the documentation so I think those were older/previous versions.

catch invalid date format errors to prevent crashing.
@ovargasp
Copy link
Author

I updated the pull request with another case that I found on processing Dates for EPG, using the same sourceas before: epg.txt, like last time I found a date with a weird format: 2000|2001|2002|2003 it crashes the xmltv.py and prevents the rest of the epg data to be processed and aded to cabernet, so I added some code to catch the error and decided to use today's date as program date, it can be whatever you want it only prevents the crashing.

Copy link

stale bot commented Dec 29, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive associated with a stale issue label Dec 29, 2024
@rocky4546 rocky4546 removed the inactive associated with a stale issue label Dec 31, 2024
@rocky4546
Copy link
Contributor

Need to incorporate this into the current set of changes.

@stale stale bot added the inactive associated with a stale issue label Jan 14, 2025
@rocky4546 rocky4546 added enhancement New feature or request and removed inactive associated with a stale issue labels Jan 15, 2025
@cabernetwork cabernetwork deleted a comment from stale bot Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants