Skip to content
Browse files

use strftime so that a "zulu" date will be returned

  • Loading branch information...
1 parent d26e706 commit b88696d2db898223d1aa39d47aa5af832c89eeae @jcoyne jcoyne committed May 2, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/solrizer/default_descriptors.rb
View
4 lib/solrizer/default_descriptors.rb
@@ -114,9 +114,9 @@ def self.dateable_converter
def self.iso8601_date(value)
begin
if value.is_a?(Date) || value.is_a?(Time)
- DateTime.parse(value.to_s).to_time.utc.iso8601
+ DateTime.parse(value.to_s).to_time.utc.strftime('%Y-%m-%dT%H:%M:%SZ')
elsif !value.empty?
- DateTime.parse(value).to_time.utc.iso8601
+ DateTime.parse(value).to_time.utc.strftime('%Y-%m-%dT%H:%M:%SZ')
end
rescue ArgumentError => e
raise ArgumentError, "Unable to parse `#{value}' as a date-time object"

0 comments on commit b88696d

Please sign in to comment.
Something went wrong with that request. Please try again.