opendate 0.1.6__py3-none-any.whl → 0.1.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of opendate might be problematic. Click here for more details.
- date/__init__.py +1 -1
- date/date.py +14 -0
- {opendate-0.1.6.dist-info → opendate-0.1.7.dist-info}/METADATA +1 -1
- opendate-0.1.7.dist-info/RECORD +7 -0
- opendate-0.1.6.dist-info/RECORD +0 -7
- {opendate-0.1.6.dist-info → opendate-0.1.7.dist-info}/LICENSE +0 -0
- {opendate-0.1.6.dist-info → opendate-0.1.7.dist-info}/WHEEL +0 -0
date/__init__.py
CHANGED
date/date.py
CHANGED
|
@@ -1068,6 +1068,20 @@ class Time(_pendulum.Time):
|
|
|
1068
1068
|
|
|
1069
1069
|
return cls(obj.hour, obj.minute, obj.second, obj.microsecond, tzinfo=tz)
|
|
1070
1070
|
|
|
1071
|
+
@expect_time
|
|
1072
|
+
def astimezone(self, tz: str | _zoneinfo.ZoneInfo | _datetime.tzinfo):
|
|
1073
|
+
"""Convert timezone
|
|
1074
|
+
|
|
1075
|
+
>>> Time(12, 0).astimezone(Timezone('America/Sao_Paulo'))
|
|
1076
|
+
Time(9, 0, 0, tzinfo=Timezone('America/Sao_Paulo'))
|
|
1077
|
+
|
|
1078
|
+
>>> Time(12, 0, tzinfo=Timezone('Europe/Moscow')).astimezone(Timezone('America/Sao_Paulo'))
|
|
1079
|
+
Time(6, 0, 0, tzinfo=Timezone('America/Sao_Paulo'))
|
|
1080
|
+
|
|
1081
|
+
"""
|
|
1082
|
+
_dt = DateTime.combine(Date.today(), self, tzinfo=self.tzinfo or UTC)
|
|
1083
|
+
return _dt.astimezone(tz).time()
|
|
1084
|
+
|
|
1071
1085
|
|
|
1072
1086
|
class DateTime(DateBusinessMixin, _pendulum.DateTime):
|
|
1073
1087
|
"""Inherits and wraps pendulum.DateTime
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
date/__init__.py,sha256=Y89D6EmdQGQtJJ249F5ntB03zBzRrIvJauMtl7O1TNU,2747
|
|
2
|
+
date/date.py,sha256=PFB5JUxNSglg-9wYlb7Ls1xtrZE6KgAa6lppJPu-S4I,56484
|
|
3
|
+
date/extras.py,sha256=7xsOsdhKrmGoyLl5W4Xhg9TfuytaaIH7uKWW9PvR5sE,2832
|
|
4
|
+
opendate-0.1.7.dist-info/LICENSE,sha256=V4Rx8WWy7v8Fim6PHcEBszpZkDLbCHeorz1e_gr0Cbk,1111
|
|
5
|
+
opendate-0.1.7.dist-info/METADATA,sha256=C-bSRlSw0LmDwt-ayIwf21FTX18VxnWWCjcVYEUI5CM,1841
|
|
6
|
+
opendate-0.1.7.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
7
|
+
opendate-0.1.7.dist-info/RECORD,,
|
opendate-0.1.6.dist-info/RECORD
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
date/__init__.py,sha256=vPv4a112UZpPY0IShVpSq4ffImTTinxuySxWt1vyeS0,2747
|
|
2
|
-
date/date.py,sha256=S10D2_VtXraKzpdS0xtbzLEF_n8ny0Xadmtnc4AKSCk,55943
|
|
3
|
-
date/extras.py,sha256=7xsOsdhKrmGoyLl5W4Xhg9TfuytaaIH7uKWW9PvR5sE,2832
|
|
4
|
-
opendate-0.1.6.dist-info/LICENSE,sha256=V4Rx8WWy7v8Fim6PHcEBszpZkDLbCHeorz1e_gr0Cbk,1111
|
|
5
|
-
opendate-0.1.6.dist-info/METADATA,sha256=mbJikEalgLHajmzvTEF_MRiLUPGX0u94I5DdFnva6JQ,1841
|
|
6
|
-
opendate-0.1.6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
7
|
-
opendate-0.1.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|