time: fix strptime '%s %z'

This format is used by Git to store commit dates, and it is a sensible
way to represent them in a simple manner.

It works correctly in C and perl, but in Ruby it returns the wrong date:

  require 'time'
  time = Time.strptime('1377283786 -0700', '%s %z')
  time.strftime('%s %z')
  => 1377283786 -0500

The fix is simple and don't affect the normal usage of '%s'.

In addition, '%s' is meant to imply UTC, however:

  Time.strptime('1377283786', '%s')
  => 2013-08-23 13:49:46 -0500

After this patch:

  Time.strptime('1377283786', '%s')
  => 2013-08-23 18:49:46 +0000

  Time.strptime('1377283786 -0700', '%s %z')
  => 2013-08-23 11:49:46 -0700

For more information, see bug:

https://bugs.ruby-lang.org/issues/7445

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Merge pull request #1 from felipec/fc/strptime

time: fix strptime '%s %z'
Bumped version to 2.0.2.
spec: strptime: improve '%s %z' test

We can test both the time and timezone at the same time, and also, it
makes sense to do the succinct test of checking back-to-back conversion
of strptime().strftime().

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
strptime: synchronize with MRI

It turns out that '%s' in C returns a local time, and strptime(3)
doesn't say that '%s' implies UTC. So it makes sense to keep the old
behavior for this case, and it's also safer.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Merge pull request #3 from felipec/strptime-improve

Strptime improvement
Bumped version to 2.0.3.