[Python-bugs-list] [ python-Bugs-697989 ] Clarify mktime semantics

SourceForge.net noreply@sourceforge.net
Thu, 06 Mar 2003 07:44:51 -0800


Bugs item #697989, was opened at 2003-03-05 14:46
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=697989&group_id=5470

Category: Documentation
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Erland Lewin (erl)
Assigned to: Nobody/Anonymous (nobody)
Summary: Clarify mktime semantics

Initial Comment:
Python Library Reference, Chapter 6.9

mktime: I believe the C mktime calls ignore the weekday
and Julian day values in the tuple. I therefor assume
that the Python function also does so, which should be
documented.


----------------------------------------------------------------------

>Comment By: Erland Lewin (erl)
Date: 2003-03-06 16:44

Message:
Logged In: YES 
user_id=116933

I have a draft of the C99 standard, which in paragraph
7.23.2.3 describes mktime, and says:

"The original values of the tm_wday and tm_yday components
of the structure are ignored..."

So, I would say that mktime() is *not* underspecified by ISO C.

In order to write correct programs, it is neccessary to know
the semantics of the functions, and IMHO the manual should
specify what can be expected of them.


----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2003-03-05 20:05

Message:
Logged In: YES 
user_id=31435

Python does (for the most part) inherit mktime semantics 
from the platform C, but mktime() is "underspecified" by 
ANSI C and there's little that can be said about oddball 
cases across platforms.  Sometimes it even depends on 
the preprocessor symbols defined when the platform C 
library was compiled.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=697989&group_id=5470