On Sun, May 4, 2014 at 12:39 PM, Sascha Abel <sascha.abel / ewetel.net> wrote:

> But if you
>
>   t.strftime('%s %z')
>
> you do not get some sort of "timestring". What you actually do is ask to
> build a string in the following manner:
>
>   '%s %z' => '0' + ' ' + '+0100'

Yes, but that's an implementation detail. If "%s %z" was truly wrong,
the fact that it returns the stored timezone could be considered a
bug.

> It indeed works perfectly fine, just not the way you think:
>
>   Time.strptime('0 +0200', '%s %z').strftime('%s %z')
>   => "0 +0100"

Huh?

  require 'time'
  Time.strptime('0 +0200', '%s %z').strftime('%s %z')
  => "0 +0200"
  RUBY_VERSION
  => "2.2.0"

What version are you using?

-- 
Felipe Contreras