@@ -826,11 +826,12 @@ def logs(self, container, stdout=True, stderr=True, stream=False,
826826 tail (str or int): Output specified number of lines at the end of
827827 logs. Either an integer of number of lines or the string
828828 ``all``. Default ``all``
829- since (datetime or int ): Show logs since a given datetime or
830- integer epoch (in seconds)
829+ since (datetime, int, or float ): Show logs since a given datetime,
830+ integer epoch (in seconds) or float (in nanoseconds)
831831 follow (bool): Follow log output. Default ``False``
832- until (datetime or int): Show logs that occurred before the given
833- datetime or integer epoch (in seconds)
832+ until (datetime, int, or float): Show logs that occurred before
833+ the given datetime, integer epoch (in seconds), or
834+ float (in nanoseconds)
834835
835836 Returns:
836837 (generator or str)
@@ -855,6 +856,8 @@ def logs(self, container, stdout=True, stderr=True, stream=False,
855856 params ['since' ] = utils .datetime_to_timestamp (since )
856857 elif (isinstance (since , int ) and since > 0 ):
857858 params ['since' ] = since
859+ elif (isinstance (since , float ) and since > 0.0 ):
860+ params ['since' ] = since
858861 else :
859862 raise errors .InvalidArgument (
860863 'since value should be datetime or positive int, '
@@ -870,6 +873,8 @@ def logs(self, container, stdout=True, stderr=True, stream=False,
870873 params ['until' ] = utils .datetime_to_timestamp (until )
871874 elif (isinstance (until , int ) and until > 0 ):
872875 params ['until' ] = until
876+ elif (isinstance (until , float ) and until > 0.0 ):
877+ params ['until' ] = until
873878 else :
874879 raise errors .InvalidArgument (
875880 'until value should be datetime or positive int, '
0 commit comments