duplicity.dup_time module
Provide time related exceptions and functions
- duplicity.dup_time.genstrtotime(timestr, override_curtime=None)[source]
Convert a generic time string to a time in seconds
- duplicity.dup_time.gettzd(dstflag)[source]
Return w3’s timezone identification string.
Expresed as [+/-]hh:mm. For instance, PST is -08:00. Zone is coincides with what localtime(), etc., use.
- duplicity.dup_time.intstringtoseconds(interval_string)[source]
Convert a string expressing an interval (e.g. “4D2s”) to seconds
- duplicity.dup_time.inttopretty(seconds)[source]
Convert num of seconds to readable string like “2 hours”.
- duplicity.dup_time.setcurtime(time_in_secs=None)[source]
Sets the current time in curtime and curtimestr
- duplicity.dup_time.setprevtime(time_in_secs)[source]
Sets the previous time in prevtime and prevtimestr
- duplicity.dup_time.stringtopretty(timestring)[source]
Return pretty version of time given w3 time string
- duplicity.dup_time.stringtotime(timestring)[source]
Return time in seconds from w3 or duplicity timestring
If there is an error parsing the string, or it doesn’t look like a valid datetime string, return None.