summaryrefslogtreecommitdiffstats
path: root/Modules/timemodule.c
Commit message (Collapse)AuthorAgeFilesLines
* make the gettmarg error message more correct by making it more vague ;-)Skip Montanaro2001-08-221-1/+1
| | | | see SF bug 434143, part of which this addresses
* Add -E command line switch (ignore environment variables like PYTHONHOMENeil Schemenauer2001-07-231-1/+1
| | | | and PYTHONPATH).
* SF patch #418147 Fixes to allow compiling w/ Borland, from Stephen Hansen.Tim Peters2001-05-141-3/+5
|
* Updated version of RISCOS support. SF patch 411213 by Dietmar SchwertbergerGuido van Rossum2001-04-101-2/+10
|
* SF patch 407758, "timemodule patches for Cygwin", from Norman Vine.Tim Peters2001-03-201-0/+7
| | | | http://sourceforge.net/tracker/?func=detail&aid=407758&group_id=5470&atid=305470
* Use Py_CHARMASK for ctype macros. Fixes bug #232787.Martin v. Löwis2001-03-061-1/+1
|
* Fix typo in RISCOS patch inside MS #ifdef. (Probably my own fingers.)Guido van Rossum2001-03-021-1/+1
|
* RISCOS changes by dschwertberger.Guido van Rossum2001-03-021-1/+5
|
* Make the 'time' argument to the timemodule functions strftime, asctime,Thomas Wouters2001-01-191-30/+54
| | | | | | ctime, gmtime and localtime optional, defaulting to 'the current time' in all cases. Adjust docs, add news item. Also convert all argument-handling to METH_VARARGS. Closes SF patch #103265.
* The Mac C library (MSL from CodeWarrior 6) and I/O library (GUSIJack Jansen2000-12-121-2/+2
| | | | | 2.1.3) finally agree on when the epoch is, so the code to convert epochs has been disabled.
* REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum2000-09-011-9/+0
| | | | This should match the situation in the 1.6b1 tree.
* Do the absolute minimal amount of modifications to eradicateBarry Warsaw2000-09-011-8/+7
| | | | | | | | | | | | | | | Py_FatalError() from module initialization functions. The importing mechanism already checks for PyErr_Occurred() after module importation and it Does The Right Thing. Unfortunately, the following either were not compiled or tested by the regression suite, due to issues with my development platform: almodule.c cdmodule.c mpzmodule.c puremodule.c timingmodule.c
* Chris Herborth <chrish@pobox.com>:Fred Drake2000-08-151-4/+1
| | | | | | | | | Minor updates for BeOS R5. Use of OSError in test.test_fork1 changed to TestSkipped, with corresponding change in BeOS/README (by Fred). This closes SourceForge patch #100978.
* 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
|