Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
Two objections have been raised to the proposed datetime.localtime() function: 1. It offers the third subtly different way to obtain current time in datetime module. The first two being provided by datetime.now() and datetime.today(). 2. C library localtime function takes POSIX timestamp as an argument, so datetime.localtime() should follow suit. I attach a prototype patch for a different approach: make datetime.astimezone() method supply local timezone information if no argument is given. This patch also demonstrates that extracting all TZ information that platform may have knowledge of is not trivial. ---------- Added file: http://bugs.python.org/file25939/datetime-astimezone-proto.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9527> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com