sardana-nxsrecorder 3.26.0__py3-none-any.whl → 3.26.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sardana-nxsrecorder
3
- Version: 3.26.0
3
+ Version: 3.26.1
4
4
  Summary: NeXus Sardana Scan Recorder
5
5
  Home-page: https://github.com/nexdatas/sardana-nxs-filerecorder/
6
6
  Author: Jan Kotanski
@@ -0,0 +1,6 @@
1
+ sardananxsrecorder/__init__.py,sha256=D9XnMblVPsgwwr6BjPz877oQCWyEj1GqmL7nb3JAb70,896
2
+ sardananxsrecorder/nxsrecorder.py,sha256=bS7vevRyLtPgz7zoK2XJid9XCTgdKAeJRZb-QK2Nl5g,58343
3
+ sardana_nxsrecorder-3.26.1.dist-info/METADATA,sha256=Y56-3gdsv1UknXfjr8uyMUPVinvmbEYF_Ev-CqHlzCk,8035
4
+ sardana_nxsrecorder-3.26.1.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
5
+ sardana_nxsrecorder-3.26.1.dist-info/top_level.txt,sha256=YdD3m417i-jlYyQWgiizgZ8lQQcOjM8y-bmUHrGkfY4,19
6
+ sardana_nxsrecorder-3.26.1.dist-info/RECORD,,
@@ -20,4 +20,4 @@
20
20
  """ Sardana Scan Recorders """
21
21
 
22
22
  #: package version
23
- __version__ = "3.26.0"
23
+ __version__ = "3.26.1"
@@ -26,7 +26,6 @@ import sys
26
26
 
27
27
  import numpy
28
28
  import json
29
- import pytz
30
29
  import time
31
30
  import weakref
32
31
  import socket
@@ -1175,8 +1174,16 @@ class NXS_FileRecorder(BaseFileRecorder):
1175
1174
  :returns: formatted time string
1176
1175
  :rtype: :obj:`str`
1177
1176
  """
1177
+ fmt = '%Y-%m-%dT%H:%M:%S.%f%z'
1178
1178
  try:
1179
- tz = pytz.timezone(tzone)
1179
+ if sys.version_info >= (3, 9):
1180
+ import zoneinfo
1181
+ tz = zoneinfo.ZoneInfo(tzone)
1182
+ starttime = mtime.replace(tzinfo=tz)
1183
+ else:
1184
+ import pytz
1185
+ tz = pytz.timezone(tzone)
1186
+ starttime = tz.localize(mtime)
1180
1187
  except Exception:
1181
1188
  self.warning(
1182
1189
  "Wrong TimeZone. "
@@ -1185,13 +1192,15 @@ class NXS_FileRecorder(BaseFileRecorder):
1185
1192
  self.__macro().warning(
1186
1193
  "Wrong TimeZone. "
1187
1194
  "The time zone set to `%s`" % self.__timezone)
1188
- tz = pytz.timezone(self.__timezone)
1195
+ if sys.version_info >= (3, 9):
1196
+ import zoneinfo
1197
+ tz = zoneinfo.ZoneInfo(self.__timezone)
1198
+ starttime = mtime.replace(tzinfo=tz)
1199
+ else:
1200
+ import pytz
1201
+ tz = pytz.timezone(self.__timezone)
1202
+ starttime = tz.localize(mtime)
1189
1203
 
1190
- fmt = '%Y-%m-%dT%H:%M:%S.%f%z'
1191
- if sys.version_info > (3, 6):
1192
- starttime = mtime.replace(tzinfo=tz)
1193
- else:
1194
- starttime = tz.localize(mtime)
1195
1204
  return str(starttime.strftime(fmt))
1196
1205
 
1197
1206
  def _endRecordList(self, recordlist):
@@ -1,6 +0,0 @@
1
- sardananxsrecorder/__init__.py,sha256=GktUxiQNBhdbje4E9WlYbikp7LfZxiGHRK8eBCiEf1U,896
2
- sardananxsrecorder/nxsrecorder.py,sha256=n8QAbHwDbcJzHgFzR2wDhL9sdEBMqhj33T6BdKXyNvs,57947
3
- sardana_nxsrecorder-3.26.0.dist-info/METADATA,sha256=1JlJrVuAujdNy7IUw-tKBo3OKAYpcPH5YnDwNExBuYA,8035
4
- sardana_nxsrecorder-3.26.0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
5
- sardana_nxsrecorder-3.26.0.dist-info/top_level.txt,sha256=YdD3m417i-jlYyQWgiizgZ8lQQcOjM8y-bmUHrGkfY4,19
6
- sardana_nxsrecorder-3.26.0.dist-info/RECORD,,