File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 44#define RACE_FILE_NAME "/races.json"
55#define CURRENT_RACE_FILE_NAME "/current_races.json"
66
7+ // path to the races schedule, needs to be updated each year
78#define RACE_JSON_URL "https://raw.githubusercontent.com/sportstimes/f1/main/_db/f1/2025.json"
9+ // Number of days before the race to display circuit image rather than sessions schedule
10+ #define DaysBeforeRace 3
811
912time_t nextRaceStartUtc ;
1013
@@ -32,8 +35,8 @@ bool isRaceWeek(const char *sessionStartTime)
3235 // Parse date from UTC and convert to an epoch
3336 strptime (sessionStartTime , "%Y-%m-%dT%H:%M:%S" , & tm );
3437
35- time_t sixDaysBeforeRaceEpoch = mktime (& tm ) - (3 * SECS_PER_DAY );
36- return UTC .now () > sixDaysBeforeRaceEpoch ;
38+ time_t DaysBeforeRaceEpoch = mktime (& tm ) - (DaysBeforeRace * SECS_PER_DAY );
39+ return UTC .now () > DaysBeforeRaceEpoch ;
3740}
3841
3942String getConvertedTime (const char * sessionStartTime , const char * timeFormat = "" )
You can’t perform that action at this time.
0 commit comments