Project

General

Profile

Actions

Bug #2417

closed

Time.asctime/ctime output differs from 1.8

Added by tmat (Tomas Matousek) over 14 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
1.9.1p129
[ruby-core:26980]

Description

=begin

ruby -v -e'puts Time.now.asctime'
ruby 1.8.6 (2009-03-31 patchlevel 368) [i386-mingw32]
Tue Dec 01 10:48:45 2009

ruby19 -v -e'puts Time.now.asctime'
ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mswin32]
Tue Dec 1 10:48:49 2009

The difference is in the padding of days. 1.9 uses space while 1.8 uses '0'. I find the 1.8 behavior better and the change in 1.9 unnecesary. Is it intentional?
=end

Actions #1

Updated by usa (Usaku NAKAMURA) over 14 years ago

  • Status changed from Open to Rejected
  • Assignee set to usa (Usaku NAKAMURA)

=begin
It's intentional.
asctime is derived from ANSI/ISO C, and the specification clearly defines
that the day of month should be padded by spaces, not zeros.
=end

Actions #2

Updated by tmat (Tomas Matousek) over 14 years ago

=begin
Thanks for clarification. If it is so clearly defined then there is a bug in Ruby 1.8.
=end

Actions #3

Updated by usa (Usaku NAKAMURA) over 14 years ago

  • Status changed from Rejected to Closed

=begin
Hmm, it has a point in what you say.
I've backported the changeset to ruby_1_8.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0