From 2dd7964926306c1850906d92e079802fa5c73123 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 27 Sep 2013 21:56:24 -0400 Subject: [PATCH] C'mon, you're a Ruby developer. What are you doing. --- features/support/env.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/features/support/env.rb b/features/support/env.rb index 5c550fe4..0d296d76 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -41,12 +41,12 @@ def location(folder, direction) end def seconds_agnostic_time(datetime = Time.now) - pieces = datetime.to_s.split(" ") - time = "#{pieces[1].split(':').first}:#{pieces[1].split(':')[1]}:\\d{2}" + date, time, zone = datetime.strftime("%Y-%m-%d %H:%M:%S %z").split(" ") + hours, minutes, _ = time.split(":") [ - Regexp.escape(pieces[0]), - time, - Regexp.escape(pieces.last) + Regexp.escape(date), + "#{hour}:#{minutes}:\\d{2}", + Regexp.escape(zone) ].join("\\ ") end