Ejemplo n.º 1
0
    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
Ejemplo n.º 2
0
    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
Ejemplo n.º 3
0
 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
Ejemplo n.º 4
0
 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)
Ejemplo n.º 5
0
 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)
Ejemplo n.º 6
0
 def from64(cls, value):
     """Doc..."""
     return Base64.from64(value, True)
Ejemplo n.º 7
0
 def from64(cls, value):
     """Doc..."""
     return Base64.from64(value, True)