Skip to content

Commit

Permalink
Update tutorials
Browse files Browse the repository at this point in the history
Updates tutorials following migration from `pytz` to `zoneinfo`.
  • Loading branch information
maread99 committed Sep 9, 2023
1 parent 0a091e1 commit d42ace5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/tutorials/minutes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"source": [
"# setup\n",
"from datetime import datetime\n",
"from zoneinfo import ZoneInfo\n",
"\n",
"import pandas as pd\n",
"import exchange_calendars as xcals"
Expand Down Expand Up @@ -50,7 +51,7 @@
"]\n",
"lon = xcals.get_calendar(\"XLON\")\n",
"for input in inputs:\n",
" assert lon.next_minute(input) == pd.Timestamp('2021-06-15 14:34', tz='UTC')"
" assert lon.next_minute(input) == pd.Timestamp('2021-06-15 14:34', tz=ZoneInfo(\"UTC\"))"
]
},
{
Expand Down
6 changes: 4 additions & 2 deletions docs/tutorials/trading_index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
"outputs": [],
"source": [
"# setup\n",
"from zoneinfo import ZoneInfo\n",
"\n",
"import exchange_calendars as xcals\n",
"import pandas as pd\n",
"\n",
Expand Down Expand Up @@ -3221,7 +3223,7 @@
}
],
"source": [
"pd.Timestamp('2021-12-23 05:00:00', tz=\"UTC\") in period_105[2]"
"pd.Timestamp('2021-12-23 05:00:00', tz=ZoneInfo(\"UTC\")) in period_105[2]"
]
},
{
Expand All @@ -3248,7 +3250,7 @@
}
],
"source": [
"pd.Timestamp('2021-12-23 05:00:00', tz=\"UTC\") in period_105[1]"
"pd.Timestamp('2021-12-23 05:00:00', tz=ZoneInfo(\"UTC\")) in period_105[1]"
]
},
{
Expand Down

0 comments on commit d42ace5

Please sign in to comment.