コード例 #1
0
ファイル: Reporter.py プロジェクト: hannahp/PyAid
    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
コード例 #2
0
ファイル: Reporter.py プロジェクト: moliqingwa/PyAid
    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
コード例 #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
コード例 #4
0
ファイル: TimeUtils.py プロジェクト: moliqingwa/PyAid
 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)
コード例 #5
0
ファイル: TimeUtils.py プロジェクト: hannahp/PyAid
 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)
コード例 #6
0
 def from64(cls, value):
     """Doc..."""
     return Base64.from64(value, True)
コード例 #7
0
ファイル: RadixConverter.py プロジェクト: sernst/PyAid
 def from64(cls, value):
     """Doc..."""
     return Base64.from64(value, True)