I wholeheartedly agree with the recommendations of the community posted 
here.  I will nevertheless reach out to the documentation team to see if 
and where this behavior can be documented.

On Tuesday, March 7, 2017 at 2:29:54 PM UTC-5, Adam (Cloud Platform 
Support) wrote:
>
> The development server time zone also defaults to UTC, so the solution is 
> to not try to change it to anything and instead write your code to work the 
> same way in production and development (that is, to deal with times that 
> are in UTC).
>
> On Tuesday, March 7, 2017 at 12:30:20 AM UTC-5, Yashavanta S B wrote:
>>
>> Thank you for the information. But my question is - why it is showing the 
>> different time zone in servlets and filters, even when we are setting the 
>> default time zone to GMT+00:00. The issue is with the local development 
>> server. But in the production server it is fine.
>>
>> On Monday, March 6, 2017 at 1:01:11 PM UTC+5:30, Anastasios Hatzis wrote:
>>>
>>> There are really good reasons why an app should not change timezones on 
>>> the server and why to store all datetimes in UTC. This is especially true 
>>> in all distributed systems. The app must be designed in a way that it can 
>>> convert from/to UTC while exchanging data with the outside world or only 
>>> where it really needs to calculate with local timezones. I don't 
>>> understand, why you would want to test a different date behavior in 
>>> development server. Even if it would be possible in dev server, you can be 
>>> sure that the app will break once it is deployed.
>>>
>>> On Monday, 6 March 2017 06:20:22 UTC+1, Yashavanta S B wrote:
>>>>
>>>> Thanks for the reply.
>>>>
>>>> What about in development server? Can we change the app-engine time 
>>>> zone in development server? Because we want to test date behavior for 
>>>> different time zones and we are facing the difficulties in testing the 
>>>> different time zone dates.
>>>>
>>>> On Sunday, March 5, 2017 at 3:44:33 AM UTC+5:30, Adam (Cloud Platform 
>>>> Support) wrote:
>>>>>
>>>>> The timezone in App Engine is always set to UTC and cannot be changed. 
>>>>> You'll need to convert between UTC and the timezone you wish to use. You 
>>>>> can refer to one of the numerous existing threads 
>>>>> <https://www.google.ca/search?q=app+engine+set+timezone> on the 
>>>>> subject for more background.
>>>>>
>>>>> On Friday, March 3, 2017 at 11:48:41 PM UTC-5, Yashavanta S B wrote:
>>>>>>
>>>>>> Hey,
>>>>>>
>>>>>> In ServletContextListener initialization method we are setting the 
>>>>>> JVM Time Zone as
>>>>>>
>>>>>> public void contextInitialized(ServletContextEvent event) {
>>>>>> TimeZone.setDefault(TimeZone.getTimeZone("GMT+00:00"));
>>>>>> }
>>>>>>
>>>>>> But when i check the Time Zone information in servlets and filters 
>>>>>> the Time Zone got changed.
>>>>>>
>>>>>> log.info("TimeZone : " + TimeZone.getDefault());
>>>>>>
>>>>>> What might be the reason? 
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/7b79efac-f88e-4cdd-ae5e-be7113698200%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • [google-appengine]... Yashavanta S B
    • [google-appen... 'Adam (Cloud Platform Support)' via Google App Engine
      • [google-a... Yashavanta S B
        • [goog... Anastasios Hatzis
          • [... Yashavanta S B
            • ... 'Adam (Cloud Platform Support)' via Google App Engine
              • ... 'Nicholas (Google Cloud Support)' via Google App Engine
              • ... Yashavanta S B
                • ... 'Adam (Cloud Platform Support)' via Google App Engine

Reply via email to