def time_to_int(time):
    """Convert a timestamp into an integer representation."""
    hour = str(time.hour)
    minutes = str(time.minute)
    if len(hour)==1:
        hour ='0'+hour
    if len(minutes)==1:
        minutes = '0'+minutes
    return int(hour+minutes)