tags 629699 + confirmed
thanks

* Didier Raboud <[email protected]>, 2011-06-08, 17:13:
   self.assertEqual("11 months and 30 days", distance_of_time_in_words(0, 
31536000))
AssertionError: '11 months and 30 days' != '11 months and 29 days'

Indeed, distance_of_time_in_words returns different values depending on the current time (and timezone):

$ export TZ=Europe/Warsaw
$ for d in 01-01 03-01 03-02 03-27 04-02 10-30; do faketime "2011-$d UTC" 
python -c 'import webhelpers.date as d; print d.distance_of_time_in_words(0, 31536000)'; 
done
1 year
11 months and 28 days
11 months and 30 days
11 months, 30 days and 1 hour
11 months and 29 days
11 months, 29 days and 23 hours


--
Jakub Wilk



_______________________________________________
Python-modules-team mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team

Reply via email to