summaryrefslogtreecommitdiffstats
path: root/Modules/timemodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Use METH_OLDARGS instead of numeric constant 0 in method def. tablesAndrew M. Kuchling2000-08-031-6/+6
|
* Use METH_VARARGS instead of numeric constant 1 in method def. tablesAndrew M. Kuchling2000-08-031-4/+4
|
* merge Include/my*.h into Include/pyport.hPeter Schneider-Kamp2000-07-311-10/+0
| | | | marked my*.h as obsolete
* Use 'void' directly instead of the ANY #define, now that all code is ANSI C.Thomas Wouters2000-07-251-3/+3
| | | | Leave the actual #define in for API compatibility.
* Fix floattime prototype ((void), not (double))Thomas Wouters2000-07-241-1/+1
|
* ANSIfy some more forward declarations.Thomas Wouters2000-07-241-1/+1
|
* ANSIfy yet another hidden function definition.Thomas Wouters2000-07-241-5/+0
|
* Even more ANSIfication: fix as many function pointers and declarations asThomas Wouters2000-07-221-2/+3
| | | | possible.
* Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',Thomas Wouters2000-07-211-3/+3
| | | | | | | | | | | | | | | | | | and a couple of functions that were missed in the previous batches. Not terribly tested, but very carefully scrutinized, three times. All these were found by the little findkrc.py that I posted to python-dev, which means there might be more lurking. Cases such as this: long func(a, b) long a; long b; /* flagword */ { and other cases where the last ; in the argument list isn't followed by a newline and an opening curly bracket. Regexps to catch all are welcome, of course ;)
* ANSI-ficationPeter Schneider-Kamp2000-07-101-45/+15
|
* Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.Tim Peters2000-07-091-5/+5
|
* Mac only: two epoch problem workarounds are no longer needed for GUSIJack Jansen2000-07-031-2/+2
| | | | >= 2.0.5. One still is:-(
* Change copyright notice - 2nd try.Guido van Rossum2000-06-301-6/+0
|
* Change copyright notice.Guido van Rossum2000-06-301-22/+7
|
* Trent Mick <trentm@activestate.com>:Fred Drake2000-06-291-4/+11
| | | | | | | | | | This patch fixes a possible overflow in the Sleep system call on Win32/64 in the time_sleep() function in the time module. For very large values of the give time to sleep the number of milliseconds can overflow and give unexpected sleep intervals. THis patch raises an OverflowError if the value overflows. Closes SourceForge patch #100514.
* Trent Mick <trentm@activestate.com>:Fred Drake2000-06-291-5/+6
| | | | | | | | | | Mark Hammond provided (a long time ago) a better Win32 specific time_clock implementation in timemodule.c. The library for this implementation does not exist on Win64 (yet, at least). This patch makes Win64 fall back on the system's clock() function for time_clock(). This closes SourceForge patch #100512.
* Trent Mick: use size_t instead of int where appropriate (time_strftime()).Guido van Rossum2000-06-281-2/+2
|
* M.-A. Lemburg <mal@lemburg.com>:Fred Drake2000-05-091-1/+4
| | | | | Fixed a bug due to a /* inside /*...*/. GCC doesn't like this and bombs.
* Jack Jansen:Guido van Rossum2000-04-261-0/+17
| | | | | | | | This patch is a workaround for Macintosh, where the GUSI I/O library (time, stat, etc) use the MacOS epoch of 1-Jan-1904 and the MSL C library (ctime, localtime, etc) uses the (apparently ANSI standard) epoch of 1-Jan-1900. Python programs see the MacOS epoch and we convert values when needed.
* Fix probable bug; if errno == EINTR, floatsleep() doesn't break out ofAndrew M. Kuchling2000-03-241-1/+1
| | | | | | | a Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS block, but it calls Py_BLOCK_THREADS anyway. The change moves Py_BLOCK_THREADS to inside the if, so it's only executed when the function actually returns unexpectedly.
* Fix bogus error reporting on strptime: let PyArg_ParseTuple set exception.Jeremy Hylton2000-03-141-5/+4
| | | | Also, wrap long line.
* Massive patch by Skip Montanaro to add ":name" to as manyGuido van Rossum2000-02-291-4/+4
| | | | PyArg_ParseTuple() format string arguments as possible.
* The functions asctime() and mktime() are documented to take a 9-tupleGuido van Rossum2000-01-121-4/+10
| | | | | | only. Through some mysterious interaction, they would take 9 separate arguments as well. This misfeature is now disabled (to end a difference with JPython).
* Jack Jansen: Mac has no EINTR.Guido van Rossum1999-11-081-0/+4
|
* In floatsleep(), when using select(), ignore EINTR error.Guido van Rossum1999-08-191-2/+4
|
* Apparently __GNU_LIBRARY__ is defined for glibc as well as for libc5.Guido van Rossum1999-04-231-3/+3
| | | | | | | The test really wanted to distinguish between the two. So now we test for __GLIBC__ instead. I have confirmed that this works for glibc and I have an email from Christian Tanzer confirming that it works for libc5, so it should be fine.
* Jonathan Giddy notes, and Chris Lawrence agrees, that some comments onGuido van Rossum1999-04-051-3/+3
| | | | #else/#endif are wrong, and that #if HAVE_TM_ZONE should be #ifdef.
* #$@%! Forgot to remove a #error directive used for testing. Sorry.Guido van Rossum1999-03-291-1/+0
|
* Chris Lawrence writes:Guido van Rossum1999-03-291-18/+28
| | | | | | | | | | | | | | | | | | | | | | """ The GNU folks, in their infinite wisdom, have decided not to implement altzone in libc6; this would not be horrible, except that timezone (which is implemented) includes the current DST setting (i.e. timezone for Central is 18000 in summer and 21600 in winter). So Python's timezone and altzone variables aren't set correctly during DST. Here's a patch relative to 1.5.2b2 that (a) makes timezone and altzone show the "right" thing on Linux (by using the tm_gmtoff stuff available in BSD, which is how the GLIBC manual claims things should be done) and (b) should cope with the southern hemisphere. In pursuit of (b), I also took the liberty of renaming the "summer" and "winter" variables to "july" and "jan". This patch should also make certain time calculations on Linux actually work right (like the tz-aware functions in the rfc822 module). (It's hard to find DST that's currently being used in the southern hemisphere; I tested using Africa/Windhoek.) """
* Patch by Chris Herborth for BeOS code.Guido van Rossum1999-03-091-14/+8
| | | | | | | | | | He writes: I had an off-by-1000 error in floatsleep(), and the problem with time.clock() is that it's not implemented properly on QNX... ANSI says it's supposed to return _CPU_ time used by the process, but on QNX it returns the amount of real time used... so I was confused.
* Patch by Tadayoshi Funaba (with some changes) to be smarter aboutGuido van Rossum1999-02-231-6/+12
| | | | | | | | guessing what happened when strftime() returns 0. Is it buffer overflow or was the result simply 0 bytes long? (This happens for an empty format string, or when the format string is a single %Z and the timezone is unknown.) if the buffer is at least 256 times as long as the format, assume the latter.
* We don't support leap seconds, so the seconds field of a time 9-tupleGuido van Rossum1999-02-221-1/+1
| | | | should be in the range [0-59]. Noted by Tadayoshi Funaba.
* The doc string for strptime had the arguments reversed -- the stringGuido van Rossum1999-01-071-1/+1
| | | | comes first, the format second! Scott Cotton discovered this.
* Get rid of the strptype() declaration -- on some BSD systems, it's aGuido van Rossum1999-01-031-1/+1
| | | | | conflict, and it should be declared in time.h anyway. (Too bad if gcc -Wall won't be happy if it isn't declared...)
* Add DL_EXPORT() to all modules that could possibly be usedGuido van Rossum1998-12-041-1/+1
| | | | on BeOS or Windows.
* Make gcc -Wall happy:Guido van Rossum1998-10-071-6/+8
| | | | | (1) add dummy decl for strptime(); (2) move the code to set accept2dyear to the front of inittime().
* Fixes for OS/2 by Jeff Rush.Guido van Rossum1998-09-281-9/+9
|
* Y2K fix affecting asctime(), mktime(), strftime().Guido van Rossum1998-08-251-19/+37
| | | | | | | | | | | | | | | | 2-digit years are now converted using rules that are (according to Fredrik Lundh) recommended by POSIX or X/Open: 0-68 mean 2000-2068, 69-99 mean 1969-1999. 2-digit years are now only accepted if time.accept2dyear is set to a nonzero integer; if it is zero or not an integer or absent, only year values >= 1900 are accepted. Year values 100-1899 and negative year values are never accepted. The initial value of time.accept2dyear depends on the environment variable PYTHONY2K: if PYTHONY2K is set and non-empty, time.accept2dyear is initialized to 0; if PYTHONY2K is empty or not set, time.accept2dyear is initialized to 0.
* Changes for BeOS, QNX and long long, by Chris Herborth.Guido van Rossum1998-08-041-4/+38
|
* Added doc strings.Guido van Rossum1998-06-271-11/+114
|
* Added strptime, if it exists. Modified after a patch by Jesse Hallio.Guido van Rossum1998-06-091-10/+53
|
* Instead of calling mktime(), which has all sorts of unwanted sideGuido van Rossum1998-04-271-6/+2
| | | | | effects, simply zero out the struct tm buffer before using it; this should take care of the BSD folks' concern just as well.
* Check for HAVE_MKTIME (if you don't have it, some tests will fail, butGuido van Rossum1998-03-061-0/+9
| | | | at least the build will now succeed). For Sony NEWS-OS, BSD 4.3 based.
* Raise ValueError: "unconvertible time" when ctime() returns NULL,Guido van Rossum1998-03-031-0/+4
| | | | instead of dumping core.
* At Jeff Rush' request, add Py_BEGIN/END_ALLOW_THREADS around call toGuido van Rossum1997-12-291-0/+3
| | | | DosSleep().
* (1) call mktime() just before strftime(); it normalizes the buffer andGuido van Rossum1997-12-081-0/+8
| | | | | | may set the timezone name for BSD systems... (2) fake all of the timezone variables for the mac.
* Patch for QNX, by Chris Herborth.Guido van Rossum1997-12-021-5/+5
|
* os2 patch by Jeff RushGuido van Rossum1997-11-221-1/+21
|
* Move the Py_{{BEGIN,END}_ALLOW,BLOCK}_THREADS macros in time_sleep()Guido van Rossum1997-11-031-7/+15
| | | | | | to inside floatsleep(). This is necessary because floatsleep() does the error handling and it must have grabbed the interpreter lock and thread state before it can do so.
* timezone support for macintosh (Jack)Guido van Rossum1997-10-081-0/+36
|