[#6363] Re: rescue clause affecting IO loop behavior — ts <decoux@...>

>>>>> "D" == David Alan Black <dblack@candle.superlink.net> writes:

17 messages 2000/11/14
[#6367] Re: rescue clause affecting IO loop behavior — David Alan Black <dblack@...> 2000/11/14

Hello again --

[#6582] best way to interleaf arrays? — David Alan Black <dblack@...>

Hello --

15 messages 2000/11/26

[#6646] RE: Array Intersect (&) question — Aleksi Niemel<aleksi.niemela@...>

Ross asked something about widely known and largely ignored language (on

23 messages 2000/11/29
[#6652] RE: Array Intersect (&) question — rpmohn@... (Ross Mohn) 2000/11/29

aleksi.niemela@cinnober.com (Aleksi Niemel) wrote in

[#6723] Re: Array Intersect (&) question — Mathieu Bouchard <matju@...> 2000/12/01

> >Use a hash. Here's code to do both and more. It assumes that

[#6656] printing/accessing arrays and hashes — raja@... (Raja S.)

I'm coming to Ruby with a Python & Common Lisp background.

24 messages 2000/11/30

[ruby-talk:6521] Time Trouble

From: Niklas Backlund <d99-nba@...>
Date: 2000-11-22 18:38:42 UTC
List: ruby-talk #6521
Hi,

here I am with my small problems again! =)

Can someone please explain this result to me:

irb(main):001:0> 1.upto(12) {|m| puts Time.local(2000, m, 1, 0, 0)}
Sat Jan 01 00:00:00 GMT+1:00 2000
Tue Feb 01 00:00:00 GMT+1:00 2000
Wed Mar 01 00:00:00 GMT+1:00 2000
Sat Apr 01 01:00:00 GMT+1:00 2000
Mon May 01 01:00:00 GMT+1:00 2000
Thu Jun 01 01:00:00 GMT+1:00 2000
Sat Jul 01 01:00:00 GMT+1:00 2000
Tue Aug 01 01:00:00 GMT+1:00 2000
Fri Sep 01 01:00:00 GMT+1:00 2000
Sun Oct 01 01:00:00 GMT+1:00 2000
Wed Nov 01 00:00:00 GMT+1:00 2000
Fri Dec 01 00:00:00 GMT+1:00 2000

All the Time's that are created in Apr..Oct get an hour
offset added! So in order to create midnight of, say,
Sep 21, I have to write:

irb(main):003:0> puts Time.local(2000, 9, 20, 23, 0)
Thu Sep 21 00:00:00 GMT+1:00 2000

Feature or bug?

If it's a feature, I would say that it clearly violates
the Principle of Least Surprise. Or does someone have
an argument that could convince me of the opposite?

/Niklas




In This Thread

Prev Next