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

  • Home
  • SEARCH
  • 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 8858919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:56:11+00:00 2026-06-14T14:56:11+00:00

Event ‘start_time’ is being stored incorrectly into mysql database. events that store incorrectly https://graph.facebook.com/112797205532177

  • 0

Event ‘start_time’ is being stored incorrectly into mysql database.

events that store incorrectly

https://graph.facebook.com/112797205532177 – stores as 2012-10-12 19:00:00
correct is 2012-10-13

{
"id": "112797205532177", 
"owner": {
    "name": "MUST...NOT...KILL", 
    "category": "Musician/band", 
    "id": "108837005801452"
}, 
"name": "METAL MEOWLISHA", 
"description": "W/ Brutailty", 
"start_time": "2012-10-13", 
"location": "The brass mug", 
"venue": {
    "id": "151496721577181"
}, 
"privacy": "OPEN", 
"updated_time": "2012-07-27T21:20:20+0000"
}

https://graph.facebook.com/278345158937377 – stored as 2012-11-18 18:00:00
correct is 2012-11-19

{
"id": "280381075399709", 
"owner": {
    "name": "Lamb of God", 
    "category": "Musician/band", 
    "id": "9008741434"
}, 
  "name": "Lamb of God On Tour", 
  "description": "Wed/Oct-31\tLos Angeles, CA @ TBA\t", 
  "start_time": "2012-10-31", 
  "privacy": "OPEN", 
  "updated_time": "2012-09-05T21:37:29+0000"
}

i have been searching the net checking for the solution. with no luck

the goal is to store the exact field ‘start_time’ with no conversion. there is no conversion in my code. i am thinking it has to do with php settings

Edit: added the returned results from the graph api and here is my insert string(in codeigniter

$eventdata = array(
            'artists_name'=>$artists,
            'event_status'=>$event_stat,
            'formatted_datetime'=>$formatted_datetime,
            'formatted_location'=>$formatted_location,
            'event_id'=>$event_id,
            'venue_name'=>$venue_name,
            'venue_city'=>$vcity,
            'venue_region'=>$vstate,
            'venue_country'=>$vcountry,
            'venue_lat'=>$vlat,
            'venue_long'=>$vlong,
            'date_time'=>$date_time,
            'rsvp_url'=>$rsvp_url,
            'ticket_url'=>$ticket_url,
            'updated'=>$updated);
            $eventinsert = $this->db->insert_string('newEvents',$eventdata);
            $this->db->query($eventinsert);

thanks

EDIT this is the complete php file

include 'facebook.php';

$facebook = new Facebook(array(
  'appId'  => 'xxxxxxxxxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx',
));


$check = $facebook->api('278345158937377');
print_r ($check['start_time']);

?>

Stripped everything out i could so far. i find it odd that a string result would get autoconverted before displaying.

graph and fql on facebooks site display 2012-11-19
my site displays 2012-11-18

  • 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-14T14:56:12+00:00Added an answer on June 14, 2026 at 2:56 pm

    Add the GMT offset to the time and THEN store it.

    Example: Im in EST, the time difference is 5 hours, so add 18000 to the unix time stamp

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

Sidebar

Related Questions

Where event detail should store?How to make alarm for specific event that i don't
Event-delegation must be used to make events work after inserting DOM elements (i.e Ajax
assumption: Event\Service\EventService is my personal object that works with Event\Entity\Event entities This code works
Given event store with fields: AggregateId : integer Payload : blob Version : integer
What event of FiddlerApplication specifies moment when page is fully loaded into web browser?
The event of document_complete fires more than once. Which isn't really that bad. But
what event is fired when an item is restored from recycle bin into a
The Event Handling Guide for iOS mentions the Device Features Programming Guide. However, that
Event though a right-click (as far as I know) fires a mousedown event, that
What event is fired when a block of text is pasted into a UITextView?

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.