Esempio n. 1
0
def _safe_marshal_time(when):
    if not when:
        return None
    return timeutils.marshall_now(now=when)
Esempio n. 2
0
def _safe_marshal_time(when):
    if not when:
        return None
    return timeutils.marshall_now(now=when)
Esempio n. 3
0
 def test_marshall_time(self):
     now = timeutils.utcnow()
     binary = timeutils.marshall_now(now)
     backagain = timeutils.unmarshall_time(binary)
     self.assertEqual(now, backagain)
Esempio n. 4
0
 def test_marshall_time(self):
     now = timeutils.utcnow()
     binary = timeutils.marshall_now(now)
     backagain = timeutils.unmarshall_time(binary)
     self.assertEqual(now, backagain)