[issue12750] datetime.strftime('%s') should respect tzinfo

2011-08-16 Thread Daniel O'Connor
Daniel O'Connor added the comment: On 17/08/2011, at 12:42, Alexander Belopolsky wrote: > Alexander Belopolsky added the comment: > >> it would appear the problem lies with strftime() > > Yes, strftime('%s') ignores tzinfo at the moment. This is not a bug. S

[issue12750] datetime.datetime how to correctly attach a timezone to an existing naive datetime

2011-08-16 Thread Daniel O'Connor
Daniel O'Connor added the comment: On 17/08/2011, at 10:30, Alexander Belopolsky wrote: > Alexander Belopolsky added the comment: > >> i.e. it appears that replace() applies the TZ offset to a naive datetime >> object effectively assuming it is local time rather than un

[issue12750] datetime.datetime timezone problems

2011-08-15 Thread Daniel O'Connor
Daniel O'Connor added the comment: On 16/08/2011, at 1:06, R. David Murray wrote: > R. David Murray added the comment: > > Ah. Well, pre-3.2 datetime itself did not generate *any* non-naive datetimes. > > Nor do you need to specify everything for replace. dt.replace(

[issue12750] datetime.datetime timezone problems

2011-08-15 Thread Daniel O'Connor
Daniel O'Connor added the comment: On 15/08/2011, at 23:39, R. David Murray wrote: > R. David Murray added the comment: > > In what way does 'replace' not satisfy your need to set the tzinfo? Ahh that would work, although it is pretty clumsy since you have to specify

[issue12750] datetime.datetime timezone problems

2011-08-14 Thread Daniel O'Connor
New submission from Daniel O'Connor : It isn't possible to add a timezone to a naive datetime object which means that if you are getting them from some place you can't directly control there is no way to set the TZ. eg pywws' DataStore returns naive datetime's whic