/usr/lib64/python2.6/site-packages/mx/DateTime
NameSizeModeActions
mxDateTime/-0755rm
ARPA.py76160644editdlrm
ARPA.pyc74800644editdlrm
ARPA.pyo74800644editdlrm
COPYRIGHT10300644editdlrm
DateTime.py321190644editdlrm
DateTime.pyc273180644editdlrm
DateTime.pyo272170644editdlrm
Feasts.py28560644editdlrm
Feasts.pyc46590644editdlrm
Feasts.pyo46590644editdlrm
ISO.py104410644editdlrm
ISO.pyc103810644editdlrm
ISO.pyo103810644editdlrm
LazyModule.py44000644editdlrm
LazyModule.pyc42720644editdlrm
LazyModule.pyo42720644editdlrm
LICENSE45870644editdlrm
Locale.py45840644editdlrm
Locale.pyc58500644editdlrm
Locale.pyo58500644editdlrm
NIST.py145840644editdlrm
NIST.pyc135790644editdlrm
NIST.pyo135790644editdlrm
ODMG.py52620644editdlrm
ODMG.pyc76600644editdlrm
ODMG.pyo76600644editdlrm
Parser.py425430644editdlrm
Parser.pyc364050644editdlrm
Parser.pyo364050644editdlrm
README1420644editdlrm
timegm.py28330644editdlrm
timegm.pyc30950644editdlrm
timegm.pyo30950644editdlrm
Timezone.py50960644editdlrm
Timezone.pyc36520644editdlrm
Timezone.pyo36520644editdlrm
__init__.py17080644editdlrm
__init__.pyc21800644editdlrm
__init__.pyo21800644editdlrm
Edit: /usr/lib64/python2.6/site-packages/mx/DateTime/NIST.py (14584B)
""" Access routines to the NIST Network Time Services. This module allows you to access the UTC standard time bases via the Internet. The two functions localtime() and gmtime() will return accurate DateTime instances based on the NIST services. Since access through the Internet can be slow, the module also provides a way to calibrate the computer's clock and then have localtime() and gmtime() use the calibrated clock instead of the NIST services. To calibrate the two functions, call calibrate() with the number of calibration rounds you wish to apply. Copyright (c) 2000, Marc-Andre Lemburg; mailto:mal@lemburg.com Copyright (c) 2000-2008, eGenix.com Software GmbH; mailto:info@egenix.com See the documentation for further information on copyrights, or contact the author. All Rights Reserved. """ import socket # This module needs access to sockets ! import select # This module needs access to select ! import DateTime import re,errno,exceptions,string,time # Enable to produce debugging output _debug = 0 # Timeout waiting for a daytime server to respond in seconds TIMEOUT = 4.0 # Port numbers try: DAYTIME_PORT = socket.getservbyname('daytime','tcp') except socket.error: DAYTIME_PORT = 13 try: TIME_PORT = socket.getservbyname('time','tcp') except socket.error: TIME_PORT = 37 # Known servers: daytime_servers = ('time.nist.gov', 'time-a.nist.gov', 'time-b.nist.gov', 'time-nw.nist.gov', 'time-a.timefreq.bldrdoc.gov', 'time-b.timefreq.bldrdoc.gov', 'time-c.timefreq.bldrdoc.gov', 'utcnist.colorado.edu', 'utcnist1.reston.mci.net', 'nist1.datum.com', ) # IP cache (XXX update these every now and then): ip_cache = {'utcnist1.reston.mci.net': '204.70.131.13', 'time-a.nist.gov': '129.6.16.35', 'time-c.timefreq.bldrdoc.gov': '132.163.135.132', 'time-a.timefreq.bldrdoc.gov': '132.163.135.130', 'nist1.datum.com': '209.0.72.7', 'time-nw.nist.gov': '131.107.1.10', 'time-b.timefreq.bldrdoc.gov': '132.163.135.131', 'time-b.nist.gov': '129.6.16.36', 'time.nist.gov': '192.43.244.18', 'utcnist.colorado.edu': '128.138.140.44'} # XXX Not yet implemented... # Use as fallback alternative for people behind firewalls: daytime_http_servers = ('http://time-a.timefreq.bldrdoc.gov:14/', ) ### Errors class Error(exceptions.StandardError): pass ### Parsers # NIST daytime signal (JJJJ YR-MO-DA HH:MM:SS TT L H msADV UTC(NIST) OTM); # see http://www.bldrdoc.gov/timefreq/service/nts.htm for details. _daytime = ('(?P\d+) ' '(?P\d+-\d\d-\d\d) ' '(?P\d?\d):(?P\d\d):(?P\d\d) ' '(?P\d\d) ' '(?P\d) ' '(?P\d) ' '(?P\d+(?:\.\d+)?) ' '(?P