persiantools 5.5.0__tar.gz → 5.5.1__tar.gz

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.
Files changed (21) hide show
  1. {persiantools-5.5.0/persiantools.egg-info → persiantools-5.5.1}/PKG-INFO +1 -1
  2. {persiantools-5.5.0 → persiantools-5.5.1}/persiantools/__init__.py +2 -2
  3. {persiantools-5.5.0 → persiantools-5.5.1}/persiantools/jdatetime.py +2 -0
  4. {persiantools-5.5.0 → persiantools-5.5.1/persiantools.egg-info}/PKG-INFO +1 -1
  5. {persiantools-5.5.0 → persiantools-5.5.1}/tests/test_jalalidatetime.py +4 -0
  6. {persiantools-5.5.0 → persiantools-5.5.1}/LICENSE +0 -0
  7. {persiantools-5.5.0 → persiantools-5.5.1}/MANIFEST.in +0 -0
  8. {persiantools-5.5.0 → persiantools-5.5.1}/README.md +0 -0
  9. {persiantools-5.5.0 → persiantools-5.5.1}/persiantools/characters.py +0 -0
  10. {persiantools-5.5.0 → persiantools-5.5.1}/persiantools/digits.py +0 -0
  11. {persiantools-5.5.0 → persiantools-5.5.1}/persiantools/utils.py +0 -0
  12. {persiantools-5.5.0 → persiantools-5.5.1}/persiantools.egg-info/SOURCES.txt +0 -0
  13. {persiantools-5.5.0 → persiantools-5.5.1}/persiantools.egg-info/dependency_links.txt +0 -0
  14. {persiantools-5.5.0 → persiantools-5.5.1}/persiantools.egg-info/requires.txt +0 -0
  15. {persiantools-5.5.0 → persiantools-5.5.1}/persiantools.egg-info/top_level.txt +0 -0
  16. {persiantools-5.5.0 → persiantools-5.5.1}/pyproject.toml +0 -0
  17. {persiantools-5.5.0 → persiantools-5.5.1}/setup.cfg +0 -0
  18. {persiantools-5.5.0 → persiantools-5.5.1}/tests/test_characters.py +0 -0
  19. {persiantools-5.5.0 → persiantools-5.5.1}/tests/test_digits.py +0 -0
  20. {persiantools-5.5.0 → persiantools-5.5.1}/tests/test_jalalidate.py +0 -0
  21. {persiantools-5.5.0 → persiantools-5.5.1}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: persiantools
3
- Version: 5.5.0
3
+ Version: 5.5.1
4
4
  Summary: Jalali date and datetime with other tools
5
5
  Author-email: Majid Hajiloo <majid.hajiloo@gmail.com>
6
6
  License-Expression: MIT
@@ -7,9 +7,9 @@
7
7
 
8
8
  __title__ = "persiantools"
9
9
  __url__ = "https://github.com/majiidd/persiantools"
10
- __version__ = "5.5.0"
10
+ __version__ = "5.5.1"
11
11
  __build__ = __version__
12
12
  __author__ = "Majid Hajiloo"
13
13
  __author_email__ = "majid.hajiloo@gmail.com"
14
14
  __license__ = "MIT"
15
- __copyright__ = "Copyright (c) 2016-2025 Majid Hajiloo"
15
+ __copyright__ = "Copyright (c) 2016-2026 Majid Hajiloo"
@@ -1086,6 +1086,8 @@ class JalaliDateTime(JalaliDate):
1086
1086
  minute = year.minute
1087
1087
  second = year.second
1088
1088
  microsecond = year.microsecond
1089
+ if tzinfo is None:
1090
+ tzinfo = year.tzinfo
1089
1091
  year = year.year
1090
1092
 
1091
1093
  elif isinstance(year, dt) and month is None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: persiantools
3
- Version: 5.5.0
3
+ Version: 5.5.1
4
4
  Summary: Jalali date and datetime with other tools
5
5
  Author-email: Majid Hajiloo <majid.hajiloo@gmail.com>
6
6
  License-Expression: MIT
@@ -42,6 +42,10 @@ class TestJalaliDateTime(TestCase):
42
42
  JalaliDateTime(1369, 7, 1, 14, 14, 1, 9111),
43
43
  JalaliDateTime(JalaliDateTime(1369, 7, 1, 14, 14, 1, 9111)),
44
44
  )
45
+ tehran_tz = timezone(timedelta(hours=3, minutes=30))
46
+ aware_source = JalaliDateTime(1404, 2, 8, 12, 0, 0, tzinfo=tehran_tz)
47
+ self.assertEqual(JalaliDateTime(aware_source).tzinfo, tehran_tz)
48
+ self.assertEqual(JalaliDateTime(aware_source, tzinfo=timezone.utc).tzinfo, timezone.utc)
45
49
 
46
50
  g = JalaliDateTime.now()
47
51
  self.assertEqual(g.time(), _time(g.hour, g.minute, g.second, g.microsecond))
File without changes
File without changes
File without changes
File without changes