[issue21380] timezone support in strftime methods broken

2014-04-30 Thread Ned Deily

Ned Deily added the comment:

As Jayanth points out, datetime objects are deliberately time zone "naive" by 
default; please read https://docs.python.org/2/library/datetime.html and 
https://docs.python.org/2/library/datetime.html#tzinfo-objects for more 
information.  Also see https://pypi.python.org/pypi/pytz/.

--
nosy: +ned.deily
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21380] timezone support in strftime methods broken

2014-04-30 Thread Jayanth Koushik

Jayanth Koushik added the comment:

This is not an issue with strftime. By default, datetime and time objects are 
'navie' and they do not contain timezone info. Nor does the datetime module 
provide any tzinfo classes of its own. You would need to write a class derived 
from tzinfo and specify it as the tzinfo attribute for these objects to be 
timezone aware.

--
nosy: +jayanthkoushik

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21380] timezone support in strftime methods broken

2014-04-28 Thread Saimadhav Heblikar

Changes by Saimadhav Heblikar :


--
nosy: +sahutd

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21380] timezone support in strftime methods broken

2014-04-28 Thread Michael P. Soulier

New submission from Michael P. Soulier:

msoulier@cappuccino:~$ python
Python 2.7.3 (default, Mar 13 2014, 11:03:55)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> now = datetime.now()
>>> now.strftime("%z")
''
>>> import time
>>> time.strftime("%z", time.localtime(time.time()))
'+'
>>>

I think those calls should be printing the UTC offset, no?

--
components: Extension Modules
messages: 217424
nosy: msoulier
priority: normal
severity: normal
status: open
title: timezone support in strftime methods broken
type: behavior
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com