Author belopolsky
Recipients Neil Muller, amaury.forgeotdarc, andersjm, barry, belopolsky, cameron, catlee, davidfraser, eric.araujo, erik.stephens, guettli, hodgestar, jamesh, jribbens, loewis, mark.dickinson, ncoghlan, pboddie, pitrou, python-dev, r.david.murray, rhettinger, steve.roberts, techtonik, tim.peters, tomster, vstinner, werneck
Date 2012-06-12.02:27:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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 and

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.
Date User Action Args
2012-06-12 02:27:41belopolskysetrecipients: + belopolsky, tim.peters, loewis, barry, jribbens, rhettinger, pboddie, jamesh, guettli, amaury.forgeotdarc, mark.dickinson, ncoghlan, davidfraser, pitrou, andersjm, catlee, vstinner, techtonik, tomster, werneck, hodgestar, Neil Muller, cameron, eric.araujo, erik.stephens, steve.roberts, r.david.murray, python-dev
2012-06-12 02:27:40belopolskysetmessageid: <>
2012-06-12 02:27:40belopolskylinkissue9527 messages
2012-06-12 02:27:39belopolskycreate