summaryrefslogtreecommitdiffstats
path: root/Modules/timemodule.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Win32 precision clock() -- Mark Hammond.Guido van Rossum1997-04-021-1/+44
|
* Issue a more meaningful error if strftime keeps returning a NULL pointer.Guido van Rossum1997-02-141-2/+5
| | | | Run the loop up to and including 8k.
* Formatting, and minor error detectionBarry Warsaw1997-01-131-49/+52
|
* Added #ifdef around ``extern int ftime();'' for MS WINDOWS (which hasGuido van Rossum1996-12-091-2/+4
| | | | | a conflicting definition somewhere). Resolved line wrap for error message in ins().
* ins(): missed a renaming in a string: dictinsert =>Barry Warsaw1996-12-091-1/+1
| | | | | | PyDict_SetItemString. GvR: note the long line > 80 chars. Wrapping suggestions?
* Greatly renamed.Barry Warsaw1996-12-061-86/+88
|
* Add extern decl of ftime() to make gcc -Wall happy.Guido van Rossum1996-12-061-0/+1
|
* Should compare errno to 0, not NULLGuido van Rossum1996-11-021-1/+1
|
* New permission notice, includes CNRI.Guido van Rossum1996-10-251-13/+20
|
* Check for NULL pointer returned from localtime()/gmtime().Guido van Rossum1996-10-081-1/+10
|
* Sleep() turns out to be win32 specific.Guido van Rossum1996-09-071-7/+6
| | | | | The timezone etc. overrides are win16 specific. Hope I got this right now...
* Some changes for better Windows portability.Guido van Rossum1996-09-061-7/+11
|
* Include "mymath.h" instead of manually declaring math functions.Guido van Rossum1996-08-081-2/+4
|
* Watcom changes.Guido van Rossum1996-05-231-1/+18
| | | | | Add mktime() overflow test and make it NeXT robust by initializing the structure from localtime().
* default CLOCKS_PER_SEC to CLK_TCK if it existsGuido van Rossum1996-02-251-0/+4
|
* mark strftime as varargsGuido van Rossum1996-02-131-1/+1
|
* Removed unused variableJack Jansen1995-10-031-1/+1
|
* added time.strftime()Guido van Rossum1995-09-131-0/+50
|
* tiny additions for Windows 3.1Guido van Rossum1995-03-141-0/+3
|
* changes for MPWGuido van Rossum1995-03-091-0/+4
|
* fix leaksGuido van Rossum1995-01-221-12/+23
|
* Added 1995 to copyright message.Guido van Rossum1995-01-041-2/+2
| | | | | Setup.in: clarified Tk comments somewhat. structmodule.c: use memcpy() instead of double precision assignment.
* Another bulky set of minor changes.Guido van Rossum1995-01-021-0/+5
| | | | | Note addition of gethostbyaddr() and improved repr() for sockets, renaming of md5.md5() to md5.new(), and fixing of leaks in threads.
* Makefile.pre.in: add $(OPT) to link commandGuido van Rossum1994-08-291-1/+1
| | | | | | | audioop.c: fix for MPW config.c.in: save original argc/argv for Lance rotormodule.c: new coding conventions timemodule.c: add casts for Lance
* Merge alpha100 branch back to main trunkGuido van Rossum1994-08-011-263/+142
|
* * timemodule.c: Add hack for Solaris 2.Guido van Rossum1993-11-231-0/+7
| | | | | | | | | | | | | | | * posixmodule.c: don't prototype getcwd() -- it's not portable... * mappingobject.c: double-check validity of last_name_char in dict{lookup,insert,remove}. * arraymodule.c: need memmove only for non-STDC Suns. * Makefile: comment out HTML_LIBS and XT_USE by default * pythonmain.c: don't prototype getopt() -- it's not standardized * socketmodule.c: cast flags arg to {get,set}sockopt() and addrbuf arg to recvfrom() to (ANY*). * pythonrun.c (initsigs): fix prototype, make it static * intobject.c (LONG_BIT): only #define it if not already defined * classobject.[ch]: remove all references to unused instance_convert() * mappingobject.c (getmappingsize): Don't return NULL in int function.
* * config.c: different default PYTHONPATH for MS-DOSGuido van Rossum1993-07-091-6/+3
| | | | | | | * timemodule.c: change #ifdef TURBO_C into #ifdef MSDOS * posixmodule.c: MSDOS changes by Marcel van der Peijl (Digicash) * stropmodule.c: use C isspace(c) to test for whitespace; add whitespace, lowercase and uppercase variables to the module.
* * Makefile: added all: and default: targets.Guido van Rossum1993-07-051-1/+12
| | | | | | | | | | | | * many files: made some functions static; removed "extern int errno;". * frozenmain.c: fixed bugs introduced on 24 June... * flmodule.c: remove 1.5 bw compat hacks, add new functions in 2.2a (and some old functions that were omitted). * timemodule.c: added MSDOS floatsleep version . * pgenmain.c: changed exit() to goaway() and added defn of goaway(). * intrcheck.c: add hack (to UNIX only) so interrupting 3 times will exit from a hanging program. The second interrupt prints a message explaining this to the user.
* * pythonmain.c: -k option, usage message, more environment flags.Guido van Rossum1993-06-241-50/+60
| | | | | | | | | | | (the latter also in frozenmain.c) * ceval.c: global 'killprint' flag raises exception when printing an expression statement's value (useful for finding stray output) * timemodule.c: add asctime() and ctime(). Change julian date to 1-based origin (as intended and documented). * Removed unused DO_TIMES stuff from timemodule.c. Added 'epoch' and 'day0' globals (year where time.time() == 0 and day of the week the epoch started).
* * Added gmtime/localtime/mktime and SYSV timezone globals to timemodule.c.Guido van Rossum1993-06-171-6/+130
| | | | | | | | | | Added $(SYSDEF) to its build rule in Makefile. * cgensupport.[ch], modsupport.[ch]: removed some old stuff. Also changed files that still used it... And made several things static that weren't but should have been... And other minor cleanups... * listobject.[ch]: add external interfaces {set,get}listslice * socketmodule.c: fix bugs in new send() argument parsing. * sunaudiodevmodule.c: added flush() and close().
* Added separate main program for the Mac: macmain.cGuido van Rossum1993-01-211-19/+22
| | | | | | | | | | | | | | | | | | | | | stdwinmodule.c: wsetfont can now return an error Makefile: add CL_USE and CL_LIB*S; config.c: move CL part around New things in imgfile; also in Makefile. longobject.c: fix comparison of negative long ints... [REAL BUG!] marshal.c: add dumps() and loads() to read/write strings timemodule.c: make sure there's always a floatsleep() posixmodule.c: rationalize struct returned by times() Makefile: add test target, disable imgfile by default thread.c: Improved coexistance with dl module (sjoerd) stdwinmodule.c: Change include stdwin.h if macintosh rotormodule.c: added missing last argument to RTR_?_region calls confic.c: merged with configmac.c, added 1993 to copyright message fileobject.c: int compared to NULL in writestring(); change fopenRF ifdef timemodule.c: simplify times() using mkvalue; include myselect.h earlier (for sequent). posixmodule: for sequent, include unistd.h instead of explicit extern definitions and don't define rename() Makefile: change misleading/wrong MD5 comments
* * Makefile: use cp -r to install the libraryGuido van Rossum1993-01-091-30/+22
| | | | | | | | * ceval.c: use #ifdef COMPAT_HACKS instead of #if 0 * Makefile: fix to make clmodule.c compile; make config.o dependent on libpython.a (so date is always correct) * timemodule.c: now sleep() also takes a float argument. * posixmodule.c: added nice().
* * Configure.py: use #!/usr/local/bin/pythonGuido van Rossum1993-01-041-1/+17
| | | | | | | | | | | * posixmodule.c: move extern function declarations to top * listobject.c: cmp() arguments must be void* if __STDC__ * Makefile, allobjects.h, panelmodule.c, modsupport.c: get rid of strdup() -- it is a portability risk * Makefile: enclosed ranlib command in parentheses for Sequent Make which aborts if the command is not found even if '-' is present * timemodule.c: time() returns a floating point number, in microsecond precision if BSD_TIME is defined.
* * macmodule.c: include allobjects.h, not .cGuido van Rossum1992-08-141-0/+4
| | | | | | * timemodule.c: the mac has no unistd.h * classobject.c: fixed several cases of return NULL that should be return -1 !!!