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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:17:21+00:00 2026-06-03T14:17:21+00:00

The strftime() function in php is not showing the correct time on my system.

  • 0

The strftime() function in php is not showing the correct time on my system. I am running php on xampp. Its around 11 o’clock on my PC clock, but the function strftime() returns 19 when I execute the following code:-

echo 'Time is - '.strftime('%H');
  • 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-03T14:17:24+00:00Added an answer on June 3, 2026 at 2:17 pm

    You can change your servers time zone by executing an ini_set at the top:

    ini_set( 'date.timezone', 'Europe/Berlin' );

    If you’re on a hosting account the server is likely in a different time zone than you are. Even if you’re running something locally I usually find it’s set differently.

    https://www.php.net/timezones

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

Sidebar

Related Questions

I am trying to call Python's time.strftime() function using a Unicode format string: u'%d\u200f/%m\u200f/%Y
I didn't realize this, but apparently Python's strftime function doesn't support dates before 1900:
I can output a locale sensitive time format using strftime('%X') , but this always
I am currently learning the zsh and now I wanted to use strftime but
at the start and end of my program, I have from time import strftime
PLATFORM: PHP & mySQL I am storing the date+time in database in the following
I'm attempting to craft a function that takes a time object and converts it
i am storing member's created date using the time() function, and echo them back
I have a function that looks like this: def getCurrentShow(hour=(localtime().tm_hour),day=datetime.datetime.now().strftime('%A')): return Schedule.objects.get(hour=hour,day=day).show so I
def index unless params['excel'].blank? render_csv(patients-#{Time.now.strftime(%Y%m%d)}) else render end end def render_csv(filename = nil) filename

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.