summaryrefslogtreecommitdiffstats
path: root/Modules/timemodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #10762: Guard against invalid/non-supported format string '%f' on ↵Senthil Kumaran2011-04-061-1/+1
| | | | Windows. Patch Santoso Wijaya.
* #11565: Fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-161-1/+1
|
* Merged revisions 87919 via svnmerge fromAlexander Belopolsky2011-02-151-1/+4
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87919 | alexander.belopolsky | 2011-01-10 20:21:25 -0500 (Mon, 10 Jan 2011) | 4 lines Issue #1726687: time.mktime() will now correctly compute value one second before epoch. Original patch by Peter Wang, reported by Martin Blais. ........
* Merged revisions ↵R. David Murray2011-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 86542,87136,87216,87221,87228,87256,87337-87338,87372,87516,87571,88164 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86542 | r.david.murray | 2010-11-19 22:48:58 -0500 (Fri, 19 Nov 2010) | 2 lines Make test class name unique so that both test classes run. ........ r87136 | r.david.murray | 2010-12-08 17:53:00 -0500 (Wed, 08 Dec 2010) | 6 lines Have script_helper._assert_python strip refcount strings from stderr. This makes the output of the function and those that depend on it independent of whether or not they are being run under a debug build. ........ r87216 | r.david.murray | 2010-12-13 17:50:30 -0500 (Mon, 13 Dec 2010) | 2 lines #10698: fix typo in example. ........ r87221 | r.david.murray | 2010-12-13 19:55:46 -0500 (Mon, 13 Dec 2010) | 4 lines #10699: fix docstring for tzset: it does not take a parameter Thanks to Garrett Cooper for the fix. ........ r87228 | r.david.murray | 2010-12-13 21:25:43 -0500 (Mon, 13 Dec 2010) | 2 lines Turn on regrtest -W (rerun immediately) option for Windows, too. ........ r87256 | r.david.murray | 2010-12-14 21:19:14 -0500 (Tue, 14 Dec 2010) | 2 lines #10705: document what the values of debuglevel are and mean. ........ r87337 | r.david.murray | 2010-12-17 11:11:40 -0500 (Fri, 17 Dec 2010) | 2 lines #10559: provide instructions for accessing sys.argv when first mentioned. ........ r87338 | r.david.murray | 2010-12-17 11:29:07 -0500 (Fri, 17 Dec 2010) | 2 lines #10454: clarify the compileall docs and help messages. [changes to compileall.py were not backported, only the doc changes] ........ r87372 | r.david.murray | 2010-12-18 11:39:06 -0500 (Sat, 18 Dec 2010) | 2 lines #10728: the default for printing help is sys.stdout, not stderr. ........ r87516 | r.david.murray | 2010-12-27 15:09:32 -0500 (Mon, 27 Dec 2010) | 5 lines #7056: runtest and runtest_inner don't use testdir, so drop it from their sigs I've only tested regular runs and -j runs. If I've broken anything else I'm sure I'll hear about it sooner or later. ........ r87571 | r.david.murray | 2010-12-29 14:06:48 -0500 (Wed, 29 Dec 2010) | 2 lines Fix same typo in docs. ........ r88164 | r.david.murray | 2011-01-24 14:34:58 -0500 (Mon, 24 Jan 2011) | 12 lines #10960: fix 'stat' links, link to lstat from stat, general tidy of stat doc. Original patch by Michal Nowikowski, with some additions and wording fixes by me. I changed the wording from 'Performs a stat system call' to 'Performs the equivalent of a stat system call', since on Windows there are no stat/lstat system calls involved. I also extended Michal's breakout of the attributes into a list to the other paragraphs, and rearranged the order of the paragraphs in the 'stat' docs to make it flow better and put it in what I think is a more logical/useful order. ........
* Merged revisions 87648,87656 via svnmerge fromAlexander Belopolsky2011-01-021-0/+4
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87648 | alexander.belopolsky | 2011-01-02 15:48:22 -0500 (Sun, 02 Jan 2011) | 1 line Issue #8013: Fixed time.asctime segfault when OS's asctime fails ........ r87656 | alexander.belopolsky | 2011-01-02 17:16:10 -0500 (Sun, 02 Jan 2011) | 1 line Issue #8013: Fixed test ........
* Issue #8899: time.struct_time now has class and atribute docstrings.Alexander Belopolsky2010-06-051-10/+16
|
* Untabify C files. Will watch buildbots.Antoine Pitrou2010-05-091-594/+594
|
* Fix whitespace.Brett Cannon2009-09-221-42/+43
|
* When range checking was added to time.strftime() a check was placed on tm_isdstBrett Cannon2009-09-221-5/+7
| | | | | | | | | | | to make sure it fell within [-1, 1] just in case someone implementing strftime() in libc was stupid enough to assume this. Turns out, though, some OSs (e.g. zOS) are stupid enough to use values outside of this range for time structs created by the system itself. So instead of throwing a ValueError, tm_isdst is now normalized before being passed to strftime(). Fixes issue #6823. Thanks Robert Shapiro for diagnosing the problem and contributing an initial patch.
* issue 4804: Provide checks for the format string of strftime, and for the ↵Kristján Valur Jónsson2009-02-041-0/+17
| | | | "mode" string of fopen on Windows. These strings are user provided from python and so we can avoid invoking the C runtime invalid parameter handler by first checking that they are valid.
* 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.