18 lines
375 B
Python
18 lines
375 B
Python
"""Agenda functions."""
|
|
|
|
from datetime import date, datetime, time
|
|
|
|
import pytz
|
|
|
|
uk_tz = pytz.timezone("Europe/London")
|
|
|
|
|
|
def uk_time(d: date, t: time) -> datetime:
|
|
"""Combine time and date for UK timezone."""
|
|
return uk_tz.localize(datetime.combine(d, t))
|
|
|
|
|
|
def uk_midnight(d: date) -> datetime:
|
|
"""Midnight UK time."""
|
|
return uk_time(d, datetime.min.time())
|