Esempio 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
Esempio 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
Esempio 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
Esempio 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)
Esempio 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)
Esempio n. 6
0
 def from64(cls, value):
     """Doc..."""
     return Base64.from64(value, True)
Esempio n. 7
0
 def from64(cls, value):
     """Doc..."""
     return Base64.from64(value, True)