summaryrefslogtreecommitdiffstats
path: root/Modules/timemodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Plug a leak in timemodule. The module dictionary is saved duringGregory P. Smith2012-11-271-1/+6
| | | | | | | | initialization. If the interpreter is shut down and reinitialized (embedded CPython), the old module dictionary was not dec-refed during the next import of the time extension module. Contributed by Torsten Marek of Google.
* Issue #14125: backport refleak fix (d4adbf908983).Stefan Krah2012-02-271-2/+3
|
* Issue #10951: Fix a compiler warning in timemodule.cVictor Stinner2011-12-171-0/+4
|
* Issue #10350: Read and save errno before calling a function which might ↵Antoine Pitrou2011-12-161-1/+3
| | | | | | overwrite it. Original patch by Hallvard B Furuseth.
* Issue #5905: time.strftime() is now using the locale encoding, instead ofVictor Stinner2011-12-091-9/+4
| | | | UTF-8, if the wcsftime() function is not available.
* Issue #10653: Fix time.strftime() on Windows, check for invalid format stringsVictor Stinner2011-10-161-4/+4
|
* Issue #10653: On Windows, use strftime() instead of wcsftime() becauseVictor Stinner2011-10-141-0/+5
| | | | wcsftime() doesn't format time zone correctly.
* Merge from 3.1Senthil Kumaran2011-04-061-1/+1
|\
| * Issue #10762: Guard against invalid/non-supported format string '%f' on ↵Senthil Kumaran2011-04-061-1/+1
| | | | | | | | Windows. Patch Santoso Wijaya.
* | time.strftime(): replace PyErr_Format() by PyErr_SetString()Victor Stinner2011-03-211-3/+2
| | | | | | | | The argument was not used in the format string.
* | #11565: Merge with 3.1.Ezio Melotti2011-03-161-1/+1
|\ \ | |/
| * #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 87136,87221,87256,87337-87338,87571,87839,88164 via ↵R. David Murray2011-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ 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. ........ 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. ........ 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. [compileall.py changes not backported.] ........ r87571 | r.david.murray | 2010-12-29 14:06:48 -0500 (Wed, 29 Dec 2010) | 2 lines Fix same typo in docs. ........ r87839 | r.david.murray | 2011-01-07 16:57:25 -0500 (Fri, 07 Jan 2011) | 9 lines Fix formatting of values with embedded newlines when rfc2047 encoding Before this patch if a value being encoded had an embedded newline, the line following the newline would have no leading whitespace, and the whitespace it did have was encoded into the word. Now the existing whitespace gets turned into a blank, the way it does in other header reformatting, and the _continuation_ws gets added at the beginning of the encoded line. ........ 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 ........
| * Recorded merge of revisions 81032 via svnmerge fromAntoine Pitrou2010-05-091-637/+637
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r81032 | antoine.pitrou | 2010-05-09 17:52:27 +0200 (dim., 09 mai 2010) | 9 lines Recorded merge of revisions 81029 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........ ................
* | Issue #1726687: time.mktime() will now correctly compute value oneAlexander Belopolsky2011-01-111-1/+4
| | | | | | | | | | second before epoch. Original patch by Peter Wang, reported by Martin Blais.
* | Issue #10864: limit year to [1; 9999] for strftime() on SolarisVictor Stinner2011-01-081-1/+1
| |
* | Issue #1777412: Remove all limits on tm_year from time.strftime()Victor Stinner2011-01-081-8/+1
| | | | | | | | The buildbots will tell us which platform does support or not negative years.
* | Issue #1777412: strftime() accepts year >= 1 instead of year >= 1900Victor Stinner2011-01-081-6/+12
| | | | | | | | | | * With Visual Studio, year have to be in [1; 9999] * Add more tests on the year field
* | Fixed error handling branches. ThanksAlexander Belopolsky2011-01-081-14/+19
| | | | | | | | Victor Stinner for pointing this out.
* | Issue #1777412: extended year range of strftime down to 1000.Alexander Belopolsky2011-01-081-2/+2
| |
* | Issue #10827: Changed the rules for 2-digit years. The time.asctimeAlexander Belopolsky2011-01-071-15/+32
| | | | | | | | | | | | | | | | function will now format any year when time.accept2dyear is false and will accept years >= 1000 otherwise. The year range accepted by time.mktime and time.strftime is still system dependent, but time.mktime will now accept full range supported by the OS. Conversion of 2-digit years to 4-digit is deprecated.
* | Further simplify gettmarg()Alexander Belopolsky2011-01-061-19/+5
| |
* | Use PyOS_snprintf for better portability.Alexander Belopolsky2011-01-061-5/+5
| |
* | - time.accept2dyear = True is now equivalent to time.accept2dyear = 1Alexander Belopolsky2011-01-051-34/+19
| | | | | | | | | | | | - removed unnecessary struct_time to tuple conversion - added more unit tests (See issue #10827 for discussion.)
* | Whitespace cleanupAlexander Belopolsky2011-01-041-2/+1
| |
* | Issue #8013: time.asctime and time.ctime no longer call system asctimeAlexander Belopolsky2011-01-041-22/+39
| | | | | | | | | | | | | | and ctime functions. The year range for time.asctime is now 1900 through maxint. The range for time.ctime is the same as for time.localtime. The string produced by these functions is longer than 24 characters when year is greater than 9999.
* | #8013 follow-up:Georg Brandl2011-01-021-7/+13
| | | | | | | | | | | | * In asctime and ctime, properly remove the newline if the year has more than four digits * Consistent error message for both functions * Fix the test comments and add a check for the removed newline
* | Issue #8013: Fixed time.asctime segfault when OS's asctime failsAlexander Belopolsky2011-01-021-0/+4
| |
* | #10699: fix docstring for tzset: it does not take a parameterR. David Murray2010-12-141-1/+1
| | | | | | | | Thanks to Garrett Cooper for the fix.
* | Include structseq.h in Python.h, and remove now-redundant includes in ↵Georg Brandl2010-11-301-1/+0
| | | | | | | | individual sources.
* | PyUnicode_AsWideCharString() takes a PyObject*, not a PyUnicodeObject*Victor Stinner2010-10-071-1/+1
| | | | | | | | | | All unicode functions uses PyObject* except PyUnicode_AsWideChar(). Fix the prototype for the new function PyUnicode_AsWideCharString().
* | time: fix gcc warningVictor Stinner2010-10-071-27/+28
| | | | | | | | | | * Create format_arg variable to use the right types * Strip trailing spaces
* | Issue #6608: time.asctime is now checking struct tm fields its inputAlexander Belopolsky2010-10-011-62/+76
| | | | | | | | before passing it to the system asctime. Patch by MunSic Jeong.
* | Issue #9979: Use PyUnicode_AsWideCharString() in time.strftime()Victor Stinner2010-09-291-21/+20
| | | | | | | | | | Allocate memory with PyMem_Alloc() instead of the PyBytes API. Prepare the surrogates support.
* | Issue #9079: Added _PyTime_gettimeofday(_PyTime_timeval *tp) to C APIAlexander Belopolsky2010-08-051-55/+4
| | | | | | | | | | | | exposed in Python.h. This function is similar to POSIX gettimeofday(struct timeval *tp), but available on platforms without gettimeofday().
* | Issue #9012: "Separate compilation of time and datetime modules."Alexander Belopolsky2010-06-161-26/+0
| | | | | | | | | | | | | | Segregated code shared between time and datetime modules into Modules/_time.c. Added a new header file, Modules/_time.h, which will be used instead of Include/timefuncs.h for declarations shared between time and datetime modules.
* | Merged revisions 81756 via svnmerge fromAlexander Belopolsky2010-06-051-10/+16
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81756 | alexander.belopolsky | 2010-06-05 10:54:26 -0400 (Sat, 05 Jun 2010) | 1 line Issue #8899: time.struct_time now has class and atribute docstrings. ........
* | Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-632/+632
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
* | Poor PLAN9, it isn't supportedAntoine Pitrou2010-02-221-16/+0
| |
* | Merged revisions 75020 via svnmerge fromBrett Cannon2009-09-221-42/+43
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r75020 | brett.cannon | 2009-09-22 12:13:27 -0700 (Tue, 22 Sep 2009) | 1 line Fix whitespace. ........
* | Merged revisions 75011 via svnmerge fromBrett Cannon2009-09-221-5/+7
|/ | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r75011 | brett.cannon | 2009-09-21 17:29:48 -0700 (Mon, 21 Sep 2009) | 10 lines When range checking was added to time.strftime() a check was placed on tm_isdst 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 #6183: Disables wcsftime on VC6.Hirokazu Yamamoto2009-06-031-1/+1
|
* Issue #5562: Use wcsftime for time.strftime where available.Martin v. Löwis2009-05-301-9/+42
|
* re-merge r69268 (issue4804) from trunk:Amaury Forgeot d'Arc2009-03-021-0/+18
| | | | | Now that the C runtime assertions are not silenced any more, we must provide checks for the format string of strftime
* Issue #5249: time.strftime returned malformed string when format stringHirokazu Yamamoto2009-02-161-3/+8
| | | | contained non ascii character on windows.
* Rename PyUnicode_AsString -> _PyUnicode_AsString andMarc-André Lemburg2008-08-071-1/+1
| | | | | | | | | PyUnicode_AsStringAndSize -> _PyUnicode_AsStringAndSize to mark them for interpreter internal use only. We'll have to rework these APIs or create new ones for the purpose of accessing the UTF-8 representation of Unicode objects for 3.1.
* Merged revisions ↵Georg Brandl2008-07-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 64623,64640,64665,64687,64689-64690,64719,64721,64735,64742,64744-64746,64756-64761,64767-64769,64771-64772,64774-64775,64788,64793,64835-64836 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r64623 | benjamin.peterson | 2008-07-01 21:51:54 +0200 (Tue, 01 Jul 2008) | 1 line write a short little section for multiprocessing; it still needs help ........ r64640 | georg.brandl | 2008-07-01 22:56:03 +0200 (Tue, 01 Jul 2008) | 2 lines Add a comment about incref'ing w. ........ r64665 | jesse.noller | 2008-07-02 18:56:51 +0200 (Wed, 02 Jul 2008) | 1 line Add #!/usr/bin/env python for ben ........ r64687 | andrew.kuchling | 2008-07-03 14:50:03 +0200 (Thu, 03 Jul 2008) | 1 line Tweak wording ........ r64689 | benjamin.peterson | 2008-07-03 14:57:35 +0200 (Thu, 03 Jul 2008) | 1 line lowercase glossary term ........ r64690 | benjamin.peterson | 2008-07-03 15:01:17 +0200 (Thu, 03 Jul 2008) | 1 line let the term be linked ........ r64719 | raymond.hettinger | 2008-07-05 04:11:55 +0200 (Sat, 05 Jul 2008) | 1 line Update comment on prediction macros. ........ r64721 | georg.brandl | 2008-07-05 12:07:18 +0200 (Sat, 05 Jul 2008) | 2 lines Fix tabs. ........ r64735 | mark.dickinson | 2008-07-05 17:25:48 +0200 (Sat, 05 Jul 2008) | 3 lines Minor rewrite of cmath_log to work around a Sun compiler bug. See issue #3168. ........ r64742 | benjamin.peterson | 2008-07-05 18:29:38 +0200 (Sat, 05 Jul 2008) | 1 line make regrtest aware of the lib2to3 resource ........ r64744 | georg.brandl | 2008-07-05 18:43:45 +0200 (Sat, 05 Jul 2008) | 2 lines Keep below 80 chars. ........ r64745 | facundo.batista | 2008-07-05 21:19:50 +0200 (Sat, 05 Jul 2008) | 3 lines Issue 3289. Removed two lines that ended doing nothing. ........ r64746 | facundo.batista | 2008-07-05 22:39:59 +0200 (Sat, 05 Jul 2008) | 4 lines Issue #3239. Differentiate the ascii call from the curses one and the builtin one. ........ r64756 | gregory.p.smith | 2008-07-06 09:16:40 +0200 (Sun, 06 Jul 2008) | 3 lines - Issue #2113: Fix error in subprocess.Popen if the select system call is interrupted by a signal. ........ r64757 | benjamin.peterson | 2008-07-06 14:39:09 +0200 (Sun, 06 Jul 2008) | 1 line remove test_compact_freelists from test_sys ........ r64758 | gregory.p.smith | 2008-07-06 19:06:29 +0200 (Sun, 06 Jul 2008) | 2 lines fix issue3304 - remove an incorrect PyMem_Free in fileio_init ........ r64759 | georg.brandl | 2008-07-06 19:36:20 +0200 (Sun, 06 Jul 2008) | 2 lines Fix opensearch template. ........ r64760 | andrew.kuchling | 2008-07-06 19:43:16 +0200 (Sun, 06 Jul 2008) | 1 line Wording fix ........ r64761 | andrew.kuchling | 2008-07-06 19:44:17 +0200 (Sun, 06 Jul 2008) | 1 line Add two items; rewrap paragraph ........ r64767 | gregory.p.smith | 2008-07-07 06:31:58 +0200 (Mon, 07 Jul 2008) | 4 lines - Issue #3309: Fix bz2.BZFile itererator to release its internal lock properly when raising an exception due to the bz2file being closed. Prevents a deadlock. ........ r64768 | josiah.carlson | 2008-07-07 06:51:46 +0200 (Mon, 07 Jul 2008) | 2 lines Fixed bugs 760475, 953599, and 1519. ........ r64769 | gregory.p.smith | 2008-07-07 06:54:31 +0200 (Mon, 07 Jul 2008) | 2 lines Add commented out #_sha256 and #_sha512 lines per issue 3183. ........ r64771 | gregory.p.smith | 2008-07-07 07:09:12 +0200 (Mon, 07 Jul 2008) | 4 lines - Issue #3094: httplib.HTTPSConnection Host: headers no longer include the redundant ":443" port number designation when the connection is using the default https port (443). ........ r64772 | skip.montanaro | 2008-07-07 13:16:14 +0200 (Mon, 07 Jul 2008) | 2 lines Correct grammar. ........ r64774 | andrew.kuchling | 2008-07-07 18:51:09 +0200 (Mon, 07 Jul 2008) | 1 line Fix example to match text ........ r64775 | facundo.batista | 2008-07-07 19:02:59 +0200 (Mon, 07 Jul 2008) | 3 lines Issue 3306. Better control for a lenght in findmax() function. ........ r64788 | georg.brandl | 2008-07-08 09:05:23 +0200 (Tue, 08 Jul 2008) | 2 lines Add missing ABCs to list. ........ r64793 | nick.coghlan | 2008-07-08 16:21:42 +0200 (Tue, 08 Jul 2008) | 1 line Add missing NEWS and ACK entries for r64791 ........ r64835 | raymond.hettinger | 2008-07-10 11:31:08 +0200 (Thu, 10 Jul 2008) | 1 line Issue 3287: Raise correct exception for float inputs. ........ r64836 | raymond.hettinger | 2008-07-10 12:28:41 +0200 (Thu, 10 Jul 2008) | 1 line Use operator.index() instead of n.__index__(). ........
* Implement PEP 3121: new module initialization and finalization API.Martin v. Löwis2008-06-111-8/+22
|