vasqued2 / ha-teamtracker

Home Assistant integration that provides real-time scores in multiple professional (NBA, NFL, NHL, MLB, MLS, and more), college (NCAA), and international (soccer, golf, tennis, mma, racing) sports using ESPN APIs.
159 stars 20 forks source link

Time Zone Adjustment #64

Closed AlexHawkins1 closed 1 year ago

AlexHawkins1 commented 1 year ago

Would it be possible to add a time zone adjustment. I am in central time and currently all times are in Eastern for me.

vasqued2 commented 1 year ago

Sounds like the time zone of your HA server or front end device is set wrong depending on what you are referring to.

The sensor sets date to GMT and the last_update to whatever timezone the HA backend uses. The card displays the start time of an event based on the timezone of the front end device.

When the time zone of the front end device changes, the time displayed on the card changes too.

vasqued2 commented 1 year ago

Did you find the problem?

AlexHawkins1 commented 1 year ago

I have not. I have tried using different variations of -6:00 (Central Time) but it is still showing me eastern start times. Some additional relevant info is that I recently moved from eastern time to central time, but I have updatethe backend timezone on HA

AlexHawkins1 commented 1 year ago

I just like that I figure it out. My PC is still in eastern and it looks like the browser is overriding the HA config. on my phone it is correct. My apologies for taking up your time.

vasqued2 commented 1 year ago

Great news!

brent20 commented 1 year ago

Hello, sorry to bring this topic back up, but I'm in the Central Time Zone and I'm having the same issue. The times are coming in from ha-teamtracker in Eastern.

on my HA Server (running Home Assistant Core),

homeassistant@hass2:~$ date
Sat Feb 11 11:14:19 CST 2023

it's set correctly to central, in my HA config, it is also set correctly for Central:

homeassistant:
  time_zone: America/Chicago

Here's an example of the values from one of my sensors:

attribution: Data provided by ESPN
sport: basketball
league: NCAAM
----
team_abbr: CREI
opponent_abbr: CONN
event_name: CONN @ CREI
date: 2023-02-11T19:00Z
kickoff_in: in 2 hours
----
clock: 2/11 - 2:00 PM EST
possession: null
last_play: null
---
last_update: '2023-02-11 10:51:34-06:00'
api_message: null
icon: mdi:basketball
friendly_name: Creighton Men's Basketball

This particular game is also being held in the central time zone if that matters. Thank you!