Project

General

Profile

Bug #4133

Unexpected result of Time#strftime("%s") on Windows with trunk

Added by Heesob Park about 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
ruby -v:
ruby 1.9.3dev (2010-12-07 trunk 30123) [i386-mswin32_90]
Backport:
2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
[ruby-core:33634]

Description

=begin
C:\work>ruby -ve 'p Time.now.strftime("%s")'
ruby 1.9.3dev (2010-12-07 trunk 30123) [i386-mswin32_90]
"0000000000000000000000000000000000000000000000000000001291790065"

C:\work>ruby -ve 'p Time.now.strftime("%s")'
ruby 1.9.2p0 (2010-08-18) [i386-mingw32]
"1291790125"

It seems that this bug is due to r29741.

In my inspect, PRI_TIMET_PREFIX is now defined as "I64" instead of "ll" in line#395 of strftime.c:

FMT('0', 1, PRI_TIMET_PREFIX"d", sec);
=end

History

#1 Updated by Yuki Sonoda about 5 years ago

  • Assignee set to Akira Tanaka

=begin

=end

#2 Updated by Usaku NAKAMURA about 5 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r30156.
Heesob, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Also available in: Atom PDF