aboutsummaryrefslogtreecommitdiffstats
path: root/lib/time.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/time.rb')
-rw-r--r--lib/time.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/time.rb b/lib/time.rb
index 91b5b54fe9..4474f275be 100644
--- a/lib/time.rb
+++ b/lib/time.rb
@@ -393,7 +393,8 @@ class Time
d = Date._strptime(date, format)
raise ArgumentError, "invalid strptime format - `#{format}'" unless d
if seconds = d[:seconds]
- Time.at(seconds)
+ offset = d[:offset] || 0
+ Time.at(seconds).localtime(offset)
else
year = d[:year]
year = yield(year) if year && block_given?