summaryrefslogtreecommitdiffstats
path: root/Modules/timemodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue 3289. Removed two lines that ended doing nothing.Facundo Batista2008-07-051-2/+0
|
* This reverts r63675 based on the discussion in this thread:Gregory P. Smith2008-06-091-3/+3
| | | | | | | http://mail.python.org/pipermail/python-dev/2008-June/079988.html Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names in the spirit of 3.0 are available via a #define only. See the email thread.
* Renamed PyString to PyBytesChristian Heimes2008-05-261-3/+3
|
* typeSkip Montanaro2008-04-061-1/+1
|
* Declare inittimezone static.Skip Montanaro2008-04-051-2/+3
|
* add %f format to datetime - issue 1158Skip Montanaro2008-03-151-1/+1
|
* Modified PyImport_Import and PyImport_ImportModule to always use absolute ↵Christian Heimes2008-01-031-2/+2
| | | | | | imports by calling __import__ with an explicit level of 0 Added a new API function PyImport_ImportModuleNoBlock. It solves the problem with dead locks when mixing threads and imports
* Fix the docstrings of time.localtime() and gmtime() for the tm_mday field.Brett Cannon2007-12-241-2/+3
| | | | Will backport.
* In Windows' time.clock(), when QueryPerformanceFrequency() fails,Georg Brandl2007-03-291-1/+2
| | | | | the C lib's clock() is used, but it must be divided by CLOCKS_PER_SEC as for the POSIX implementation (thanks to #pypy).
* Fix typo.Walter Dörwald2006-12-211-1/+1
|
* Remove an XXX marker in a comment.Brett Cannon2006-07-211-1/+1
|
* Fix bug #1520914. Starting in 2.4, time.strftime() began to check the boundsBrett Cannon2006-07-181-4/+28
| | | | | | | of values in the time tuple passed in. Unfortunately people came to rely on undocumented behaviour of setting unneeded values to 0, regardless of if it was within the valid range. Now those values force the value internally to the minimum value when 0 is passed in.
* Fix build problems with the platform SDK on windows. It is not sufficient ↵Kristján Valur Jónsson2006-07-031-1/+1
| | | | to test for the C compiler version when determining if we have the secure CRT from microsoft. Must test with an undocumented macro, __STDC_SECURE_LIB__ too.
* Fix the CRT argument error handling for VisualStudio .NET 2005. Install a ↵Kristján Valur Jónsson2006-06-121-0/+8
| | | | | | CRT error handler and disable the assertion for debug builds. This causes CRT to set errno to EINVAL. This update fixes crash cases in the test suite where the default CRT error handler would cause process exit.
* Patch #1495999: Part two of Windows CE changes.Martin v. Löwis2006-06-101-0/+2
| | | | | | - update header checks, using autoconf - provide dummies for getenv, environ, and GetVersion - adjust MSC_VER check in socketmodule.c
* Make use of METH_O and METH_NOARGS where possible.Georg Brandl2006-05-291-24/+11
| | | | Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
* Repair idiot typo, and complete the job of trying toTim Peters2006-05-251-4/+4
| | | | use the Windows time.clock() implementation on Win64.
* Some Win64 pre-release in 2000 didn't supportTim Peters2006-05-251-4/+3
| | | | | | | | QueryPerformanceCounter(), but we believe Win64 does support it now. So use in time.clock(). It would be peachy if someone with a Win64 box tried this ;-)
* Patch #1490224: set time.altzone correctly on Cygwin.Georg Brandl2006-05-171-1/+1
|
* Patch 1471925 - Weak linking support for OSXRonald Oussoren2006-04-231-0/+13
| | | | | | This patch causes several symbols in the socket and posix module to be weakly linked on OSX and disables usage of ftime on OSX. These changes make it possible to use a binary build on OSX 10.4 on a 10.3 system.
* Initialize structseq types only once.Martin v. Löwis2006-04-161-1/+6
|
* C++ compiler changes. casts, rename variables with reserved names.Anthony Baxter2006-04-131-1/+1
|
* Check return result from Py_InitModule*(). This API can fail.Neal Norwitz2006-01-191-0/+2
| | | | Probably should be backported.
* allow ctime(), gmtime(), and localtime() to take None as equivalent to an ↵Fred Drake2004-08-031-9/+30
| | | | | | omitted arg (closes SF bug #658254, patch #663482)
* Fix SF #994580, typo in time.tzsets docstring. Backport candidateNeal Norwitz2004-07-201-1/+1
|
* Bug 975996: Add _PyTime_DoubleToTimet to C APITim Peters2004-06-201-7/+5
| | | | | | | | | | | New include file timefuncs.h exports private API function _PyTime_DoubleToTimet() from timemodule.c. timemodule should export some other functions too (look for painful bits in datetimemodule.c). Added insane-argument checking to datetime's assorted fromtimestamp() and utcfromtimestamp() methods. Added insane-argument tests of these to test_datetime, and insane-argument tests for ctime(), localtime() and gmtime() to test_time.
* Raise ValueError when value being stored in a time_t variable will result inBrett Cannon2004-06-191-5/+40
| | | | | | | | | | | more than a second of precision. Primarily affects ctime, localtime, and gmtime. Closes bug #919012 thanks to Tim Peters' code. Tim suggests that the new funciton being introduced, _PyTime_DoubletoTimet(), should be added to the internal C API and then used in datetime where appropriate. Not being done now for lack of time.
* Have strftime() check its time tuple argument to make sure the tuple's valuesBrett Cannon2004-03-021-0/+42
| | | | | | | | | | are within proper boundaries as specified in the docs. This can break possible code (datetime module needed changing, for instance) that uses 0 for values that need to be greater 1 or greater (month, day, and day of year). Fixes bug #897625.
* Getting rid of all the code inside #ifdef macintosh too.Jack Jansen2003-11-201-56/+0
|
* Make temporary change of using _strptime for time.strptime permanent.Brett Cannon2003-07-011-41/+1
| | | | Flesh out docs to better explain time.strptime (closes bug #697990).
* Patch #734231: Update RiscOS support. In particular, correctMartin v. Löwis2003-05-101-1/+5
| | | | riscospath.extsep, and use os.extsep throughout.
* SF patch #718867: Fix reference leak for time.strptimeRaymond Hettinger2003-04-101-1/+4
| | | | (contributed by Brett Cannon)
* - New function time.tzset() provides access to the C library tzet()Guido van Rossum2003-03-141-74/+144
| | | | function, if supported. (SF patch #675422, by Stuart Bishop.)
* Windows flavor of floatsleep(): folded long lines, introduced a tempTim Peters2003-01-191-12/+17
| | | | var for clarity.
* When time.localtime() is passed a tick count the platform C localtime()Tim Peters2003-01-171-1/+1
| | | | | | | function can't handle, don't raise IOError -- that doesn't make sense. Raise ValueError instead. Bugfix candidate.
* Patch #623780: Replace obsolete struct macros.Martin v. Löwis2002-10-161-2/+2
|
* Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototypeMark Hammond2002-08-021-1/+1
| | | | | | for Py_Main(). Thanks to Kalle Svensson and Skip Montanaro for the patches.
* Patch to call the Pure python strptime implementation if there's noGuido van Rossum2002-07-191-3/+18
| | | | | | | | C implementation. See SF patch 474274, by Brett Cannon. (As an experiment, I'm adding a line that #undefs HAVE_STRPTIME, so that you'll always get the Python version. This is so that it gets some good exercise. We should eventually delete that line.)
* Fix bug 581232 - [Windows] Can not interrupt time.sleep()Mark Hammond2002-07-161-3/+46
| | | | time.sleep() will now be interrupted on the main thread when Ctrl+C is pressed. Other threads are never interrupted.
* Patch #569753: Remove support for WIN16.Martin v. Löwis2002-06-301-40/+8
| | | | Rename all occurrences of MS_WIN32 to MS_WINDOWS.
* Patch #568124: Add doc string macros.Martin v. Löwis2002-06-131-23/+23
|
* Got rid of ifdefs for long-obsolete GUSI versions.Jack Jansen2002-04-111-16/+0
|
* Remove all but one use of the module dict.Fred Drake2002-04-011-44/+38
|
* Update docstrings to use te attribute names of the new structures returnedFred Drake2002-03-121-2/+3
| | | | | by stat and time functions. This closes SF patch #523271.
* OS/2 EMX port changes (Modules part of patch #450267):Andrew MacIntyre2002-03-031-1/+7
| | | | | | | | | | | | | | | Modules/ _hotshot.c dbmmodule.c fcntlmodule.c main.c pwdmodule.c readline.c selectmodule.c signalmodule.c termios.c timemodule.c unicodedata.c
* Windows time_clock(): rewrite to get rid of horrid casting tricks.Tim Peters2002-02-131-12/+10
| | | | | Don't blame Mark! The horrid casting tricks were my idea to begin with. The rewrite works fine under VC6, and I *expect* will work fine under VC7.
* Ensure we also build on VC7. Involves replacing largeint.h helper functions ↵Mark Hammond2002-02-121-21/+17
| | | | with msvc's native 64 bit integers.
* Patch #504225: add plan9 ifdef to timemodule floatsleep.Martin v. Löwis2002-01-161-23/+25
|
* Include <unistd.h> in Python.h. Fixes #500924.Martin v. Löwis2002-01-121-4/+0
|
* Patch supplied by Burton Radons for his own SF bug #487390: ModifyingGuido van Rossum2001-12-081-1/+1
| | | | | | | | | | | | | type.__module__ behavior. This adds the module name and a dot in front of the type name in every type object initializer, except for built-in types (and those that already had this). Note that it touches lots of Mac modules -- I have no way to test these but the changes look right. Apologies if they're not. This also touches the weakref docs, which contains a sample type object initializer. It also touches the mmap test output, because the mmap type's repr is included in that output. It touches object.h to put the correct description in a comment.