def getSecondsFromTimecode(cls, timecode, zeroTime =None): if zeroTime is None: zeroTime = cls._ZERO_TIME if timecode is None: return zeroTime return 60*(Base64.from64(timecode)) + zeroTime
def _parseTimestamp(cls, value): if value is None: return datetime.datetime.utcnow() elif StringUtils.isStringType(value): return TimeUtils.secondsToDatetime(Base64.from64(value) + PyGlassEnvironment.BASE_UNIX_TIME) return value
def timecodeToDatetime(cls, timeCode, baseTime=0): """ Returns the datetime object that represents the given Base64 timeCode for the given base time, which by default is 0. """ return cls.secondsToDatetime(Base64.from64(timeCode) + baseTime)
def timecodeToDatetime(cls, timeCode, baseTime =0): """ Returns the datetime object that represents the given Base64 timeCode for the given base time, which by default is 0. """ return cls.secondsToDatetime(Base64.from64(timeCode) + baseTime)
def from64(cls, value): """Doc...""" return Base64.from64(value, True)