Donate Share

Python for Windows extensions

Tracker: Bugs

5 PyTime broken in python 3.1 - ID: 2860921
Last Update: Comment added ( mhammond )

Python 2.x and 3.x have different handling of pytime when you need to
create a datetime object for COM from a python datetime object

Here is the example which can show you the difference in 2.x and 3.1
import pywintypes
import datetime
x = datetime.datetime(2009,1,1)
y = pywintypes.Time(x)
print(type(x),type(y))


dmitryam ( dmitryam ) - 2009-09-17 20:14

5

Closed

Wont Fix

Nobody/Anonymous

None

None

Public


Comment ( 1 )

Date: 2009-09-17 22:51
Sender: mhammondProject AdminAccepting Donations

pywin32 has moved to datetime objects in Python 3.x, so differences are
expected, particularly when printing dates and times. This was a design
decision and can't be fixed.


Attached File

No Files Currently Attached

Changes ( 4 )

Field Old Value Date By
close_date - 2009-09-17 22:51 mhammond
allow_comments 1 2009-09-17 22:51 mhammond
resolution_id None 2009-09-17 22:51 mhammond
status_id Open 2009-09-17 22:51 mhammond