|
@@ -78,10 +78,18 @@ def locate(*patterns, match_all=True, ignore_case=True):
|
|
params.insert(0, '--ignore-case')
|
|
params.insert(0, '--ignore-case')
|
|
return $(locate @(params) -- @(patterns)).split('\n')[:-1]
|
|
return $(locate @(params) -- @(patterns)).split('\n')[:-1]
|
|
|
|
|
|
-def timestamp_iso():
|
|
|
|
|
|
+def timestamp_now_utc():
|
|
|
|
+ return dt.datetime.utcnow().replace(tzinfo=dt.timezone.utc)
|
|
|
|
+
|
|
|
|
+def timestamp_now_local():
|
|
|
|
+ # if called without tz argument astimezone() assumes
|
|
|
|
+ # the system local timezone for the target timezone
|
|
|
|
+ return timestamp_now_utc().astimezone()
|
|
|
|
+
|
|
|
|
+def timestamp_iso_local():
|
|
# if called without tz argument astimezone() assumes
|
|
# if called without tz argument astimezone() assumes
|
|
# the system local timezone for the target timezone
|
|
# the system local timezone for the target timezone
|
|
- return dt.datetime.now().astimezone().strftime('%Y%m%dT%H%M%S%z')
|
|
|
|
|
|
+ return timestamp_now_local().strftime('%Y%m%dT%H%M%S%z')
|
|
|
|
|
|
aliases['dpkg-welse'] = lambda args: '\n'.join(dpkg_welse(args[0]))
|
|
aliases['dpkg-welse'] = lambda args: '\n'.join(dpkg_welse(args[0]))
|
|
aliases['dpkg-which'] = lambda args: '\t'.join(dpkg_which(args[0]))
|
|
aliases['dpkg-which'] = lambda args: '\t'.join(dpkg_which(args[0]))
|