Skip to content

Commit c566e7c

Browse files
committed
synced nat.now doc
1 parent c224bf0 commit c566e7c

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

pandas/_libs/tslibs/nattype.pyx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,8 +1072,13 @@ class NaTType(_NaT):
10721072
10731073
Examples
10741074
--------
1075-
>>> pd.Timestamp.utcnow() # doctest: +SKIP
1076-
Timestamp('2020-11-16 22:50:18.092888+0000', tz='UTC')
1075+
>>> pd.Timestamp.now() # doctest: +SKIP
1076+
Timestamp('2020-11-16 22:06:16.378782')
1077+
1078+
If you want a specific timezone, in this case 'Brazil/East':
1079+
1080+
>>> pd.Timestamp.now('Brazil/East') # doctest: +SKIP
1081+
Timestamp('2025-11-11 22:17:59.609943-03:00)
10771082
""",
10781083
)
10791084

pandas/_libs/tslibs/timestamps.pyx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1940,10 +1940,9 @@ class Timestamp(_Timestamp):
19401940

19411941
If you want a specific timezone, in this case 'Brazil/East':
19421942

1943-
>>> pd.Timestamp.now('Brazil/East')
1943+
>>> pd.Timestamp.now('Brazil/East') # doctest: +SKIP
19441944
Timestamp('2025-11-11 22:17:59.609943-03:00)
19451945

1946-
19471946
Analogous for ``pd.NaT``:
19481947

19491948
>>> pd.NaT.now()

0 commit comments

Comments
 (0)