We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Time.new(string, in: 0)
1 parent 1917a0e commit 9af628fCopy full SHA for 9af628f
1 file changed
lib/db/postgres/native/types.rb
@@ -88,17 +88,7 @@ def parse(string)
88
return string
89
end
90
91
- if match = string.match(/\A(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+(?:\.\d+)?)([-+]\d\d(?::\d\d)?)?\z/)
92
- parts = match.captures
93
-
94
- parts[5] = Rational(parts[5])
95
96
- if parts[6].nil?
97
- parts[6] = '+00'
98
- end
99
100
- return Time.new(*parts)
101
+ return Time.new(string, in: 0)
102
103
104
0 commit comments