Time formatting and storage bugs

http://en.wikipedia.org/wiki/Time_formatting_and_storage_bugs