def rmNTPFetch(server = "pool.ntp.org", withRequestDrift = False):

    import struct
    from socket import socket, AF_INET, SOCK_DGRAM

    requestPacket = '\x1b' + 47 * '\0'
    startTime = time.time()

    try:
        sock = socket(AF_INET, SOCK_DGRAM)
        sock.settimeout(5)
    except Exception, e:
        log.error("NTPFetch: Can't create socket")
        return None

    try:
        sock.sendto(requestPacket, (server, 123))
        data, ip = sock.recvfrom(1024)
    except Exception, e:
        #log.error("NTPFetch: Error receiving data: %s" % e)
        return None

    try:
        if data:
            timestamp = struct.unpack('!12I', data)[10]
            timestamp -= 2208988800L # = date in sec since epoch

            # http://stackoverflow.com/questions/1599060/how-can-i-get-an-accurate-utc-time-with-python
            if withRequestDrift:
                reqTime = time.time() - startTime
                timestamp += reqTime / 2
            return timestamp
    except:
        log.error("NTPFetch: Conversion failed.")
        return None