: But when I use SolrJ and get it as object, I am seeing that the UTC date is
: of type Date and I am not able to retrieve back the UTC date from it and I
: get only long timestamp from that object.
: 
: I also see a private variable in that Date class called as cDate which has
: what I want (Date in UTC format). But I am not able to get the UTC value out
: of that variable. Is there any better ways to get UTC timestamp out of that
: field?

Date objects in Java do not have any intrinsic TimeZone -- they represent 
absolute fixed moments in time.  to "see" a Date in UTC (or any other 
time zone) you must convert it to a String -- either by using hte detault 
"toString()" representation, or by using a DateFormat.




-Hoss
http://www.lucidworks.com/

Reply via email to