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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:48:17+00:00 2026-05-26T18:48:17+00:00

Why in now that date is 2011/10/31 codeigniter display to me date 2011/10/30 ,

  • 0

Why in now that date is 2011/10/31 codeigniter display to me date 2011/10/30, by following code.

<?php
    echo date("Y/m/d");// Output in codeigniter is: 2011/10/30
?>

How can I make it output my date and not the server’s date?

  • 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-26T18:48:17+00:00Added an answer on May 26, 2026 at 6:48 pm

    In all of my applications, I set the default timezone using this function: (usually, as you suggested, in a ‘config’ or ‘init’ file)

    date_default_timezone_set('America/Los_Angeles');
    

    List of Supported Timezones

    The basic idea is to run that once every time your application loads, and before any times are calculated/parsed; You know your applications best, and so will need to decide the best way to achieve this.

    For example just set it in the php.ini or for codeigniter in config/config.php.

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

Sidebar

Related Questions

I have the following code... $stored_date = date_format(date_create('now'), 'Y-m-d H:i:s'); echo 'Stored date: '
I have the following date in string format 2011-29-01 12:00 am . Now I
I have the following C# code that creates a DateTime , enters it into
Suppose that I have a date Jan 31 2011 and I want to add
my database table structure is like following: wdt date teacherid 1 2011-01-11 1001 2
I have a dictionaries that look like this: s_dates_dict = {17: datetime.date(2009,21,9,0,24), 19: datetime.datetime(2011,12,1,19,39,16),
I want to make a SQL query that gets todays date and the most
How do I write a function in PHP that returns the date of delivery
Now that most of the major browsers support full page zoom (at present, the
Now that I know C++ I want to get into desktop application that have

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.