-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do PUT requests with the exact modified date (precise to a thousandth of a second) #497
Comments
s/precise to a thousandth of a second/what Fedora gave you in the graph/. Precision isn't really the issue. |
This will be a challenge. Ruby can dump a date time to any level of precision you want, but you have to specify what that level will be. It looks like RDF.rb is just using g = RDF::Graph.new
=> #<RDF::Graph:0x3fefd5e9e2d8(default)>
g.insert([RDF::URI.new('http://example.com/foo'), RDF::DC.available, DateTime.parse("2014-10-22T22:58:00.804Z")])
=> #<RDF::Graph:0x3fefd5e9e2d8(default)>
puts g.dump(:ttl)
<http://example.com/foo> <http://purl.org/dc/terms/available> "2014-10-22T22:58:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
=> nil |
RDF::Literal::DateTime actually uses #strftime with a FORMAT constant; you could monkey-patch that. Note that it only formats the literal if it is provided as a native datatype, or it is canonicalized.
|
I monkey patched RDF::Literal::DateTime in f261ba5 |
On edge fcrepo4, we get a 409 Conflict error when we attempt to do an update:
I believe this is because we are sending a lastModifed value with whole second precision, but Fedora has the value precise to a thousandth of a second. We are currently getting this value from the header, but we might need to get it from the graph in order to get the correct precision.
The text was updated successfully, but these errors were encountered: