You must store the TZ as a separate field.

Alternatively, if you don't need the date to be indexed, you can
convert it back and forth to a String that preserves TZ info (eg, the
ISO-8601 format).

Jeff

On Wed, Jan 25, 2012 at 12:53 PM, Kesava Neeli <nke...@gmail.com> wrote:
> Hi,
>
> I have a java.util.Date data type in my object.
>
> Date now = Calendar.getInstance(TimeZone.getTimeZone("America/Los_Angeles"),
> Locale.US).getTime();
>
> When I persist the object and look at the entity, I see the type stored as
> "gd:when" as the kind of element.
>
> I see the value asĀ 2012-01-25 01:01:37.938000 which is UTC time.
>
> How can I save the time in my desired timezone? The java Date type has no
> timezone setting explicitly and appengine only allows java.util.Date as a
> valid date type from java.
>
> Thanks
> Neeli
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine-java/-/__Q5MEGh6jwJ.
> To post to this group, send email to google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to