[Python-checkins] python/nondist/sandbox/datetime obj_datetime.c,1.3,1.4
tim_one@users.sourceforge.net
tim_one@users.sourceforge.net
Thu, 21 Nov 2002 11:31:32 -0800
Update of /cvsroot/python/python/nondist/sandbox/datetime
In directory sc8-pr-cvs1:/tmp/cvs-serv13321
Modified Files:
obj_datetime.c
Log Message:
datetime_today(): Removed needless use of Unix-specific gettimeofday
function. A little closer to compiling on Windows.
Index: obj_datetime.c
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/datetime/obj_datetime.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** obj_datetime.c 21 Nov 2002 19:24:53 -0000 1.3
--- obj_datetime.c 21 Nov 2002 19:31:30 -0000 1.4
***************
*** 311,324 ****
{
/* XXX need to create the instance by calling cls(y,mon,d,h,min,s,u) */
- struct timeval t;
struct tm *tm;
time_t timet;
! #ifdef GETTIMEOFDAY_NO_TZ
! gettimeofday(&t);
! #else /* !GETTIMEOFDAY_NO_TZ */
! gettimeofday(&t, (struct timezone *)NULL);
! #endif /* !GETTIMEOFDAY_NO_TZ */
! timet = t.tv_sec;
tm = localtime(&timet);
--- 311,318 ----
{
/* XXX need to create the instance by calling cls(y,mon,d,h,min,s,u) */
struct tm *tm;
time_t timet;
! time(&timet);
tm = localtime(&timet);