from datetime import datetime


def get_msg_time(byte_string):
    """
    Function extracts the walltime for the first message in the byte string passed.
    if byte string is empty it retuns the empty string
    """
    if not byte_string:
        return ''

    Wallclock_Time_String = byte_string[10:26]   # Integer [18] uS since 1970                    (2 byte padding)
    Wallclock_Time = int(Wallclock_Time_String, 16) / 1000000.0
    return datetime.utcfromtimestamp(Wallclock_Time).strftime('%Y%m%d-%H%M%S')