Skip to content

Commit 8856798

Browse files
Fix override strftime to pass tests
1 parent 0af0ae4 commit 8856798

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pandas/_libs/tslibs/timestamps.pyx

+2-3
Original file line numberDiff line numberDiff line change
@@ -916,8 +916,7 @@ class Timestamp(_Timestamp):
916916
"""
917917
return cls(datetime.fromtimestamp(ts))
918918

919-
@classmethod
920-
def strftime(cls, format):
919+
def strftime(self, format):
921920
"""
922921
Timestamp.strftime(format)
923922
@@ -929,7 +928,7 @@ class Timestamp(_Timestamp):
929928
format : str
930929
Format string to convert Timestamp to string.
931930
"""
932-
return cls(datetime.strftime(format))
931+
return datetime.strftime(self, format)
933932

934933
# Issue 25016.
935934
@classmethod

0 commit comments

Comments
 (0)