Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: third_party/tlslite/tlslite/utils/datefuncs.py

Issue 210323002: Update tlslite to 0.4.6. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Executable bit and --similarity=80 Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Author: Trevor Perrin
2 # See the LICENSE file for legal information regarding use of this file.
1 3
2 import os 4 import os
3 5
4 #Functions for manipulating datetime objects 6 #Functions for manipulating datetime objects
5 #CCYY-MM-DDThh:mm:ssZ 7 #CCYY-MM-DDThh:mm:ssZ
6 def parseDateClass(s): 8 def parseDateClass(s):
7 year, month, day = s.split("-") 9 year, month, day = s.split("-")
8 day, tail = day[:2], day[2:] 10 day, tail = day[:2], day[2:]
9 hour, minute, second = tail[1:].split(":") 11 hour, minute, second = tail[1:].split(":")
10 second = second[:2] 12 second = second[:2]
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 d = getNow() 68 d = getNow()
67 d.add(d.HOUR, hours) 69 d.add(d.HOUR, hours)
68 return d 70 return d
69 71
70 def isDateClassExpired(d): 72 def isDateClassExpired(d):
71 n = getNow() 73 n = getNow()
72 return d.before(n) 74 return d.before(n)
73 75
74 def isDateClassBefore(d1, d2): 76 def isDateClassBefore(d1, d2):
75 return d1.before(d2) 77 return d1.before(d2)
OLDNEW
« no previous file with comments | « third_party/tlslite/tlslite/utils/cryptomath.py ('k') | third_party/tlslite/tlslite/utils/entropy.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698