File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -1260,7 +1260,9 @@ class NaTType(_NaT):
12601260 Return new Timestamp object representing current time local to tz.
12611261
12621262 This method returns a new `Timestamp` object that represents the current time.
1263- If a timezone is provided, the current time will be localized to that timezone.
1263+ If a timezone is provided, either through a timezone object or an IANA
1264+ standard timezone identifier, the current time will be localized to that
1265+ timezone.
12641266 Otherwise, it returns the current local time.
12651267
12661268 Parameters
@@ -1279,6 +1281,11 @@ class NaTType(_NaT):
12791281 >>> pd.Timestamp.now() # doctest: +SKIP
12801282 Timestamp('2020-11-16 22:06:16.378782')
12811283
1284+ If you want a specific timezone, in this case 'Brazil/East':
1285+
1286+ >>> pd.Timestamp.now('Brazil/East') # doctest: +SKIP
1287+ Timestamp('2025-11-11 22:17:59.609943-03:00)
1288+
12821289 Analogous for ``pd.NaT``:
12831290
12841291 >>> pd.NaT.now()
Original file line number Diff line number Diff line change @@ -1917,7 +1917,9 @@ class Timestamp(_Timestamp):
19171917 Return new Timestamp object representing current time local to tz.
19181918
19191919 This method returns a new `Timestamp` object that represents the current time.
1920- If a timezone is provided, the current time will be localized to that timezone.
1920+ If a timezone is provided, either through a timezone object or an IANA
1921+ standard timezone identifier, the current time will be localized to that
1922+ timezone.
19211923 Otherwise, it returns the current local time.
19221924
19231925 Parameters
@@ -1936,6 +1938,11 @@ class Timestamp(_Timestamp):
19361938 >>> pd.Timestamp.now() # doctest: +SKIP
19371939 Timestamp(' 2020-11-16 22:06:16.378782' )
19381940
1941+ If you want a specific timezone, in this case ' Brazil/East' :
1942+
1943+ >>> pd.Timestamp.now(' Brazil/East' ) # doctest: +SKIP
1944+ Timestamp(' 2025-11-11 22:17:59.609943-03:00)
1945+
19391946 Analogous for ``pd.NaT``:
19401947
19411948 >>> pd.NaT.now()
You can’t perform that action at this time.
0 commit comments