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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:36:12+00:00 2026-05-27T17:36:12+00:00

PHP date() & time() return incorrect time: When date.timezone = Europe/Riga the time returned

  • 0

PHP date() & time() return incorrect time:

When date.timezone = "Europe/Riga" the time returned by date() was 03-12-2011 08:57:12, but system time was 03-12-2011 01:57:12 (timezone Europe/Riga – correct time at that moment).
When I changed timezone to “Europe/London”, the time changed to 03-12-2011 06:57:12 ( actual time 02-12-2011 23:57:12 )

Time returned by date / hwclock --show was correct (03-12-2011 01:57:12 with system timezone set as Riga)

OS: Debian 6.0

I have checked most of the questions regarding similar issues on SO/Google, but they all seem to have wrong timezone specified.

As far as I can tell there is problem between php -> os.
Of course, because the incorrect time offset is always constant I could subtract difference, but it is not a proper solution.

Any ideas will be greatly appreciated.

  • 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-27T17:36:13+00:00Added an answer on May 27, 2026 at 5:36 pm

    The problem looks similar to what I have seen on one of my servers. Looks to like bug in php 5.3.2-1. Try to run the php script in the bug report and post your results.

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

Sidebar

Related Questions

PLATFORM: PHP & mySQL I am storing the date+time in database in the following
Trying to convert a date & time value in the format of 07/19/2011 00:00
I am planning a PHP application that needs to store date/times in an MSSQL
I have asked aqbout timezones and date/time before but this is a more specific
I'm trying to develop a web application that mainly uses PHP but i'm using
here is my php code..... <?php function nicetime($date) { if(empty($date)) { return No date
I'm using QueryPath and PHP. This finds the .eventdate okay, but doesn't return anything
http://www.roguevalleyroses.com/rose_list.php?search_id=&class=&height=&growth=&color=&bloom_size=&bloom_type=&shade=&fragrance=&disease=&rebloom=&thorns=&zone=&hybridizer=Ashdown%20Roses&date_range=&text=&view=&show=&page=4 This is the page. The code that queries the results is here: http://pastebin.com/d51bfa53f
I have a bizzare problem with php date function. code: $numDays = 8; $date
I have: <?php $file=fopen(date(Y-m-d)..txt,r+) or exit(Unable to open file!); if ($_POST[lastname] <> ) {

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.