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 8873351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:26:38+00:00 2026-06-14T18:26:38+00:00

So I have this app that receives packages from cell phones including gps time

  • 0

So I have this app that receives packages from cell phones including gps time which is UTC. I store this in my mysql database from php currently.

I have two datetime fields one which contains the time from the phone and one which is the servers time.

my query looks like this: INSERT INTO GeoLocation(Time, ServerTime) VALUES(FROM_UNIXTIME(1353438497), UTC_TIMESTAMP())

I simplified and removed all other values. The current utc unix timestamp is right now: 1353438597 accordnign to http://www.unixtimestamp.com/index.php so my other cellphone timestamp is 100 seconds old, makes perfect sense.

now however to the funny thing. I should mention i live in Sweden with +1 timezone and the server is in sweden to, most likely configured to swedish time

when i use phpmyadmin to view the values just inserted it says that Time is 2012-11-20 20:08:17 but server time is 2012-11-20 19:08:23. So even tho both were correct utc times, one entered ass From_unixtime and the other with UTC_TIMESTAMP they now show different time.

I read you needed to set the timezone with SET time_zone = ‘+00:00’;

so I tried to open a query window in phpmyadmin and entered

SET time_zone = '+00:00';
SELECT Time, ServerTime FROM `GeoLocation` WHERE 1;

but i still get the exact same times reported for both fields.

however phpmyadmin does run both rows because if i instead try this:

SELECT @ @global.time_zone , @ @session.time_zone

I get this:

@@global.time_zone @@session.time_zone

SYSTEM SYSTEM

but if I do this:

SET time_zone = '+00:00';
SELECT @@global.time_zone, @@session.time_zone

I get this:

@@global.time_zone @@session.time_zone

SYSTEM +00:00

So it doesn’t make any sense to me, I have confirmed I feed it UTC time (from unix time) and yet it displays it as UTC+1 and it does not help to set time zone.

Any ideas?

  • 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-14T18:26:39+00:00Added an answer on June 14, 2026 at 6:26 pm

    The solution is to execute “SET time_zone = ‘+00:00’;” before STORING data in the database (insert).

    It will do you no good when you read the data, but if you call it when you store the data everything will be fine.

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

Sidebar

Related Questions

I copied this class from a similar class I have in this app that
I have an App that downloads and displays images from URL's. This works fine
Hey guys, here's my requirement: I have one central App which receives requests from
I have this RoR app that calls to RAILS_ROOT. When running it using rails
I have this c# web app that relies heavily on two dll files that
I have this method in App Delegate that makes a window and content view
I have a simple GAE app that includes a login/logout link. This app is
I have this iPad app using Storyboard. There are some file that are marked
I have an app that uploads an image to Facebook. this is the part
I have an app that includes a search feature. This feature is implemented by

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.