def jdptime(isodt, fmt, tz=0, ut=False):
    '''
    Args:
        isodt: datetime string in ISO format
        tz: a integer as timezone, e.g. -8 for UTC-8, 2 for UTC2
        fmt: like strftime but currently only support three format
             %y-%m-%d %H:%M:%S
             %y-%m-%d %H:%M
             %y-%m-%d
        ut: convert to UTC(adjust delta T)
    Return:
        Julian Day

    '''
    if fmt == '%y-%m-%d':
        isodate = isodt
        isot = '00:00:00'
    elif fmt == '%y-%m-%d %H:%M':
        isodate, isot = isodt.split()
        isot += ':00'
    else:
        isodate, isot = isodt.split()
    y, m, d = [int(x) for x in isodate.split('-')]
    #if isot:
    H, M, S = [int(x) for x in isot.split(':')]
    d += (H * 3600 + M * 60 + S) / 86400.0

    return g2jd(y, m, d)

    Args:
        isodt: datetime string in ISO format
        tz: a integer as timezone, e.g. -8 for UTC-8, 2 for UTC2
        fmt: like strftime but currently only support three format
             %y-%m-%d %H:%M:%S
             %y-%m-%d %H:%M
             %y-%m-%d
        ut: convert to UTC(adjust delta T)
    Return:
        Julian Day

    
aa.py