def timestamp ( format = DATEFMT , timezone = 'Africa/Johannesburg' ) : return formatdate ( datetime . now ( tz = pytz . timezone ( timezone ) ) )
output current timezone python
Return current datetime with timezone applied [ all timezones ] print sorted ( pytz . all_timezones )
def timestamp(format=DATEFMT, timezone='Africa/Johannesburg'):
    """ Return current datetime with timezone applied
        [all timezones] print sorted(pytz.all_timezones) """

    return formatdate(datetime.now(tz=pytz.timezone(timezone)))