mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	Fixed #18951 -- Formatting of microseconds.
Thanks olofom at gmail com for the report.
This commit is contained in:
		| @@ -72,6 +72,11 @@ class DateFormatTests(unittest.TestCase): | ||||
|  | ||||
|         self.assertEqual(dateformat.format(my_birthday, 'a'), 'p.m.') | ||||
|  | ||||
|     def test_microsecond(self): | ||||
|         # Regression test for #18951 | ||||
|         dt = datetime(2009, 5, 16, microsecond=123) | ||||
|         self.assertEqual(dateformat.format(dt, 'u'), '000123') | ||||
|  | ||||
|     def test_date_formats(self): | ||||
|         my_birthday = datetime(1979, 7, 8, 22, 00) | ||||
|         timestamp = datetime(2008, 5, 19, 11, 45, 23, 123456) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user