def gmtime(secs = None):
    d = date()
    if secs is not None:
       d = date(secs*1000)
    wday = d.getUTCDay() - 1 if d.getUTCDay() - 1 >= 0 else 6
    tmp = struct_time([d.getUTCFullYear(), 
        d.getUTCMonth()+1, d.getUTCDate(),
        d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(),
        wday, 0, 0])
    tmp.args[7] = _get_day_of_year(tmp.args)
    return tmp
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/time.py/gmtime/original