#NEWLINE# def _adjust_datetime_to_utc( value , from_tz ) : #NEWLINE# #INDENT# "\n    Takes a timezone-naive datetime that represents\n    something other than a UTC time and converts it to UTC (timezone-naive)\n\n    In timezones with DST, there is one hour per year where a time plus\n    timezone (i.e. 'America/New_York' w/o specifying EST vs EDT)\n    could represent one of two actual points in time, separated by an hour.\n    This function does not attempt to deal with the\n    (literally impossible) problem of figuring out which was intended,\n    and simply returns one arbitrarily.\n    (This is of course one of many reasons that storing datetimes\n    as timezone-naive local wall-clock times is, always, a very bad idea.)\n\n    " #NEWLINE# from_tz = _soft_assert_tz_not_string ( from_tz ) #NEWLINE# assert ( value . tzinfo is None ) #NEWLINE# return from_tz . localize ( value ) . astimezone ( pytz . utc ) . replace ( tzinfo = None )