Here's what I've tried so far...
 - set os.environ['TZ'] to 'UTC' on startup - failed because GAE overwrites 
this.
 - set os.environ['TZ'] to 'UTC' on each call by creating a child class to 
webapp.WSGIApplication and adding it to __call__() - failed because GAE 
overwrites this.
 - monkeypatching datetime.datetime.now() to use a specially hacked 
function - failed because GAE disallows modifying now()

I'm currently trying a hack to rewrite all calls (100+) 
to datetime.datetime.now() to instead use an app-specific implementation 
which returns the UTC time - this won't work for third party libraries, but 
that maybe OK for my app, which uses pylint custom rules to migrate 
engineers to using app-specific replacement functions (e.g. we disallow 
direct calls to gc.collect() so we can track stats better).  If this works, 
I'll post.

adam


On Wednesday, March 9, 2016 at 1:45:54 PM UTC-8, Adam Sah wrote:
>
> e.g. os.environ['TZ'] changed to America/Chicago when before it was UTC.
>
> The docs don't mention this difference anywhere.
>
> If anyone has a workaround, pls reply - I'm working on a workaround now, 
> will post if successful.
>
> hope this helps,
> adam
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/f4c00a8f-e491-4fbe-ad0d-81d748916541%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • [google-appengine] a... Adam Sah
    • [google-appengi... Adam Sah
      • [google-app... Adam Sah
        • [google... Adam Sah
          • [go... 'Nick (Cloud Platform Support)' via Google App Engine
            • ... Michael Sander
              • ... 'Nick (Cloud Platform Support)' via Google App Engine
                • ... 'Jon Parrott' via Google App Engine
                • ... 'Nick (Cloud Platform Support)' via Google App Engine
                • ... Adam Sah
                • ... Michael Sander

Reply via email to