Ejemplo n.º 1
0
    def __getString( self , ticks , sep ):
        """__getString(t,s) --> string
        
        Return date corresponding to ticks (t) as a string of format:
            
            YYYY[sep]MM[sep]DD HH:MM:SS

        where [sep] == the separator (s).            
        """        
        if '-' == sep:
            return datelib.asctime( ticks )
        elif '/' == sep:
            return datelib.cvstime( ticks )
        else:
            raise TimestampException( 'Invalid separator value: %s' % sep )
Ejemplo n.º 2
0
 def testFormat4(self):
     assertEquals('String', datelib.cvstime(ticks4), cvstime4)
Ejemplo n.º 3
0
 def testFormat3(self):
     assertEquals('String', datelib.cvstime(ticks3), cvstime3)
Ejemplo n.º 4
0
 def testFormat1(self):
     assertEquals('String', datelib.cvstime(ticks1), cvstime1)
Ejemplo n.º 5
0
 def getLocalCVSTime( self ):
     """getLocalCVSTime() --> string
     
     Returns the local time in a format suitable for use in CVS command lines.
     """
     return datelib.cvstime( self.__localTicks )
Ejemplo n.º 6
0
 def testFormat4( self ):
     assertEquals( 'String',
                   datelib.cvstime( ticks4 ),
                   cvstime4 )
Ejemplo n.º 7
0
 def testFormat3( self ):
     assertEquals( 'String',
                   datelib.cvstime( ticks3 ),
                   cvstime3 )
Ejemplo n.º 8
0
 def testFormat1( self ):
     assertEquals( 'String',
                   datelib.cvstime( ticks1 ),
                   cvstime1 )