from datetime import datetime,timedelta; #------------------------------------------------------------------------------ # convert local GMT8 to GMT time # note: input should be 'datetime' type, not 'time' type def convertLocalToGmt(localTime) : return localTime - timedelta(hours=8);