Commit 89e9ac2
When creating without tzinfo, preserve fold. (#108)
When creating a new Pendulum instance without passing in a TimezoneInfo
object and using python 3.6, the internal fold parameter was not
correct. In this scenario, self._fold was being set based on the fold
parameter in the underlying datetime object. When using python3.6, this
value exists, but is always set to 0 since Pendulum is not passing the
fold parameter to the constructor.
- Changed self._fold to always be set based on the internal fold
variable.
- Added checks to the existing unit tests to verify that the fold
parameter is being preserved.1 parent 7a496ec commit 89e9ac2
2 files changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| 205 | + | |
205 | 206 | | |
206 | 207 | | |
207 | 208 | | |
| 209 | + | |
0 commit comments