from datetime import datetime


def get_datetime(hdu):
    """Determine the datetime of an observation"""
    d=hdu[0].header['DATE-OBS']
    t=hdu[0].header['TIME-OBS']
    return datetime.strptime('%s %s' % (d,t), '%Y-%m-%d %H:%M:%S.%f')