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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:05:50+00:00 2026-05-15T06:05:50+00:00

date_default_timezone_set(‘America/Guayaquil’); $cnn->execute(‘SET NAMES utf8’); $cnn->execute(‘SET GLOBAL time_zone = -5:00’); Hi, the code above is

  • 0
date_default_timezone_set('America/Guayaquil');
$cnn->execute('SET NAMES utf8');
$cnn->execute('SET GLOBAL time_zone = "-5:00"');

Hi, the code above is run everytime someone enters the website im developing. Does someone know what the impact (in performance) of those commands is?

  • 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-05-15T06:05:50+00:00Added an answer on May 15, 2026 at 6:05 am

    Of the PHP date_default_timezone_set command: negligible

    Of the two MySQL commands: Unlikely to be significant.

    Don’t you mean SET SESSION rather than SET GLOBAL? If you’re doing it for just the connection…

    Edit: To expand on my answer, I have a script that gets included from just about every PHP script on my site that sets various configurations like date_default_timezone_set, starts sessions, defines functions and so on. It also sets the SQL mode to “TRADITIONAL” with the database connection. I think setting some configuration options is something you shouldn’t try to avoid.

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

Sidebar

Related Questions

I have set my mysql db: SET time_zone = 'America/Los_Angeles'; and in php date_default_timezone_set('America/Los_Angeles');
I use date_default_timezone_set($_SESSION['time_zone']); to set a users timezone on a page, I am wanting
Im using php to set the current timezone for a site: date_default_timezone_set('America/New_York'); How could
For EST time, I've set: date_default_timezone_set(America/New_York); As the page loads, I'm getting EST time
Code first echo time() . '<br/>'; echo date('Y-m-d H:i:s') . '<br/>'; date_default_timezone_set('America/New_York'); echo time()
Code: date_default_timezone_set('America/Los_Angeles'); $textDate = strtotime($date); var_dump($textDate); var_dump($date); The output: int 1352012400 string '11/04/12' (length=8)
** The Code** $ah_title = $_POST['ah_title']; $ah_postin = $_POST['ah_postin']; $ah_content = $_POST['ah_content']; date_default_timezone_set('America/Los_Angeles'); $ah_date
I have this value +05:00 this is my code date_default_timezone_set('UTC'); echo date('H:i A P');
<?php date_default_timezone_set(Spain/Madrid); $date=date(H:i:s); echo $date; ?> how can i set the date to my
I have this PHPExcel code: /** Error reporting */ error_reporting(E_ALL); date_default_timezone_set('Europe/London'); /** Include PHPExcel

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.