Thanks Nick !
Is there any way to know which metadata are Dates or not ?
Because in the method you linked, you need to know beforehand which field
is a date, to get it as a date.
It's very unlucky we can not format all the dates in the same way, in the
end, when the parser parse the metadata, it knows if it encounter a Date.
But I fear that we are not taking track of that, am I right ?

Cheers

2015-05-19 10:14 GMT+01:00 Nick Burch <[email protected]>:

> On Mon, 18 May 2015, Alessandro Benedetti wrote:
>
>> I am interested in understanding if there is any config param in Tika to
>> force the rendering of all dates in a specific format. Independently of the
>> parser.
>>
>
> Nope, you'll need to do it on the output side. The parsers will store the
> dates / date times into the metadata object in the form that they come in
> with, including the timezone where known.
>
> When fetching the metadata values, you can optionally get the date ones as
> a Java date rather than as a string:
>
> https://tika.apache.org/1.7/api/org/apache/tika/metadata/Metadata.html#getDate%28org.apache.tika.metadata.Property%29
>
> If you need things in a specific timezone, format that Date object into one
>
> Nick
>



-- 
--------------------------

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England

Reply via email to