We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd65e70 commit 0383e87Copy full SHA for 0383e87
stdeb/util.py
@@ -13,6 +13,7 @@
13
import tempfile
14
import stdeb
15
from stdeb import log, __version__ as __stdeb_version__
16
+from email.utils import formatdate
17
18
if hasattr(os,'link'):
19
link_func = os.link
@@ -256,12 +257,8 @@ def normstr(s):
256
257
return result
258
259
def get_date_822():
- """return output of 822-date command"""
260
- cmd = '/bin/date'
261
- if not os.path.exists(cmd):
262
- raise ValueError('%s command does not exist.'%cmd)
263
- args = [cmd,'-R']
264
- result = get_cmd_stdout(args).strip()
+ """return date string in rfc 822 format"""
+ result = formatdate()
265
result = normstr(result)
266
267
0 commit comments