def rmYMDToTimestamp(year, month, day):
    if year > Y2K38_MAX_YEAR:  #Y2K38
        year = Y2K38_MAX_YEAR
    try:
        return int(datetime(year, month, day).strftime("%s"))
    except ValueError:
        return int(time.mktime(datetime(year, month, day).timetuple())) # Windows platform doesn't have strftime(%s)