Authored by Julien Muchembled

Fix too many NewSessionError when nodes are in different timezones

Using datetime objects was a bad idea anyway. Its extra accuracy for
microseconds is lost because datime.utcnow() is slower than time.time().
# -*- coding: utf-8 -*-
import calendar, hashlib, hmac, logging, os, struct, subprocess, threading, time
from datetime import datetime
from OpenSSL import crypto
from . import utils
def newHmacSecret():
x = datetime.utcnow()
return utils.newHmacSecret(int(time.mktime(x.timetuple())) * 1000000
+ x.microsecond)
return utils.newHmacSecret(int(time.time() * 1000000))
def networkFromCa(ca):
return bin(ca.get_serial_number())[3:]
... ...