Skip to content

Commit

Permalink
update with new date & spks
Browse files Browse the repository at this point in the history
  • Loading branch information
Dnouv committed Sep 10, 2024
1 parent 6dceeef commit 5d6f5ef
Show file tree
Hide file tree
Showing 6 changed files with 563 additions and 469 deletions.
192 changes: 96 additions & 96 deletions cms/config/initialData/event-sessions.json

Large diffs are not rendered by default.

208 changes: 104 additions & 104 deletions cms/config/initialData/session.json

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions data/increment_hour.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import json
from datetime import datetime, timedelta

# Read the JSON file
with open('session.json', 'r') as file:
sessions = json.load(file)

# Initialize the new start date to 10 AM UTC 1st September 2024
new_start_date = datetime(2024, 9, 1, 10, 0, 0)

# Iterate through each session and update the "Start" and "End" dates
for session in sessions:
duration = session['Duration']
session['Start'] = new_start_date.isoformat() + 'Z'
end_date = new_start_date + timedelta(minutes=duration)
session['End'] = end_date.isoformat() + 'Z'
new_start_date = end_date # Update new_start_date for the next session

# Save the updated JSON data back to the file
with open('session.json', 'w') as file:
json.dump(sessions, file, indent=4)

print("Session times updated successfully.")
Loading

0 comments on commit 5d6f5ef

Please sign in to comment.