Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7810937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:58:23+00:00 2026-06-02T03:58:23+00:00

In Google App Engine, I have a datetime property with (auto_now_add=True) . In Objective-C

  • 0

In Google App Engine, I have a datetime property with (auto_now_add=True). In Objective-C on my iPhone, getting the current time gets me 2012-04-17 6:55:01 while on Python the auto_now_add got me 2012-04-17 11:55:01.

6:55 is my local time, and I’m not sure what time zone or format the Python date is in. How do I get both to match, either through Python or through Objective-C?

Edit: So apparently the Python date is in UTC format. But what format is my iPhone date in? I thought [NSDate date] is also in UTC? Why am I getting different results?

Edit 2: Ok got it. Needed to do this in Objective-C

NSTimeZone *timeZone = [NSTimeZone timeZoneWithName:@"UTC"];
[formatter setTimeZone:timeZone];
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T03:58:25+00:00Added an answer on June 2, 2026 at 3:58 am

    This is because the app engine always works in UTC time, your phone is probably in a different timezone.

    The runtime’s TZ environment variable is set to UTC, and can’t be changed. Timestamps returned by e.g. time.time() and datetime.datetime.now() will always be in UTC. Similarly, datetime properties in the datastore will always be stored and returned as UTC.

    You can change the time zone of a datetime in memory with the astimezone() method.

    Source

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using google app engine/python. And I have created a custom datatype and property.
In google app engine can I have www.domain.com point to version X of my
I have made a simple web form in Google app engine where I have
I have a Google App Engine app - http://mylovelyapp.appspot.com/ It has a page -
I have a simple Google App Engine app, that I wrote using ordinary strings.
I have an Google App Engine entity called MyFile. It has properties such as
So I have this code in a google app engine template: <select name='voter'> {%
I have made an update on Google App Engine with a small fix and
I have created a datastore on the google app engine but would like to
I have an application hosted on the Google App Engine platform. The application is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.