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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:05:25+00:00 2026-06-11T06:05:25+00:00

I am currently on some shared hosting and when i use NOW() or CURRENT_TIMESTAMP

  • 0

I am currently on some shared hosting and when i use NOW() or CURRENT_TIMESTAMP in my php sql queries the inserted data is 7 hours behind.

Is there something i can do in PHP to correct this?

I have tried

date_default_timezone_set('Europe/Dublin');

but it didn’t seem to make a difference.

OUTPUT:

php time: 1347544854 
date: 2012-09-13 14:0054 UTC 
mysql array(3) { 
["zone"]=> string(6) "SYSTEM" 
["utcts"]=> string(19) "2012-09-13 14:00:54" 
["now"]=> string(19) "2012-09-13 07:00:54" 
}
  • 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-11T06:05:26+00:00Added an answer on June 11, 2026 at 6:05 am

    When using the mysql functions, it’s going to use the timezone set in MySQL. You can change the timezone by using this in your query:

    SET time_zone = 'Europe/Dublin'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently having some trouble with my shared hosting as I can't use sessions
I'm trying to enable some basic commands via email. Currently I have shared hosting
Currently having some problems- now = datetime.datetime.now() month = now.strftime(%B) site = wikipedia.getSite('en', 'wikiquote')
I'm currently developing some computer-vision application for blind people. Now we decided to move
I have shared hosting account on some hosting service provider. So, I can upload
I have a shared MS Sql 2008 database with my hosting provider and MS
I'm doing some work for a site on a shared hosting environment that has
We currently have some php code that allows an end user to update records
I am currently trying to replace some portions of my code with std::shared_ptr and
I have four classes which share some arrangement of four properties. I have currently

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.