Well, I don't know exactly how you implement your application. In my case,
the users select their location by country/city and that location has a time
zone ID associated with it. The ID is standard as defined in Java, say
Asia/Jakarta is the time zone for Jakarta, Indonesia. As soon as they
selected their location (which means the time zone too) I can set this time
zone to any Calendar or DateFormat I use in my application and it works
great - summer time is taken into account where it exists and so on.

This is how it works on my machine where I have a proper Java implementation
which knows exactly what Asia/Jakarta zone is.

When I upload my application to the AppEngine however, Asia/Jakarta (and
most other time zones defined in Java) becomes the same as GMT and all the
finely crafted logic goes to hell...

So in your case if you want your app to display time properly you need a way
to find out where your user is coming from. One way is to find out from
their IP address which isn't 100% reliable. Another way is to allow the
users to make their choice.

I follow the second option. You can see how it works (oh, well, doesn't work
for most locations thanks to AppEngine's interpretation of Java) at
http://lunarium.co.uk.

Alex

On Sat, Oct 24, 2009 at 8:29 PM, Rusty Wright <rwright.li...@gmail.com>wrote:

>
> Alex, if I'm in California, USA, and I'm deploying my web application to a
> server in Greece, and someone in Japan uses my application, which time zone
> should the web application use, and how should the web server determine
> which time zone to use?
>
>
> Alexander Kolesnikov wrote:
> > I have just found that, while everything works fine locally, the real
> > AppEngine returns GMT for most time zones. I wonder if this is going to
> > be fixed. Below see the local output and then the one I am having after
> > uploading the app.
> >
> > Thanks,
> >
> > Alex
> >
> > LOCAL:
> >
> > Asia/Aden    3    false    0    Arabia Standard Time
> > Asia/Almaty    6    false    0    Alma-Ata Time
> > Asia/Amman    3    true    1    Eastern European Time
> > Asia/Anadyr    12    false    1    Anadyr Time
> > Asia/Aqtau    5    false    0    Aqtau Time
> > Asia/Aqtobe    5    false    0    Aqtobe Time
> > Asia/Ashgabat    5    false    0    Turkmenistan Time
> > Asia/Ashkhabad    5    false    0    Turkmenistan Time
> > Asia/Baghdad    3    false    0    Arabia Standard Time
> > Asia/Bahrain    3    false    0    Arabia Standard Time
> > Asia/Baku    5    true    1    Azerbaijan Time
> > Asia/Bangkok    7    false    0    Indochina Time
> >
> > ONLINE:
> >
> > Asia/Aden    3    false    0    Arabia Standard Time
> > Asia/Almaty    0    false    0    Greenwich Mean Time
> > Asia/Amman    0    false    0    Greenwich Mean Time
> > Asia/Anadyr    0    false    0    Greenwich Mean Time
> > Asia/Aqtau    0    false    0    Greenwich Mean Time
> > Asia/Aqtobe    0    false    0    Greenwich Mean Time
> > Asia/Ashgabat    0    false    0    Greenwich Mean Time
> > Asia/Ashkhabad    0    false    0    Greenwich Mean Time
> > Asia/Baghdad    0    false    0    Greenwich Mean Time
> > Asia/Bahrain    0    false    0    Greenwich Mean Time
> > Asia/Baku    5    true    1    Azerbaijan Time
> > Asia/Bangkok    0    false    0    Greenwich Mean Time
> >
> > >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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