The time is stucked

(epiz_30039234)

The time is stucked at 26th of November 2021 01:00 PM.

What should I do?

Welcome @iamjustsomeguy :tada: to the forum!

  • No information = no solution
  • Where is it stuck?
    Thanks :unamused:!
2 Likes

What I mean is when calling the date function in php. It is always gives the the date and time mentioned above

Hmm idk, do maybe set a specific variable for a time in your code? By default, UK time is set. It might have been affected by the current outage.

1 Like

Thank you for immediate reply.
For example when I load
echo date('l jS \of F Y h:i:s A');
It will reply
Friday 26th of November 2021 01:00:01 PM.
It always reset to that after a few minutes
I’m using GMT+8 time

1 Like

Do you have an example PHP page live where we can see this?

You can check my website where I reproduced the issue: https://kygek.team

I recently updated my website, so ideally this would show 27 November 2021, however the date gets stuck and it is showing 30 October 2021 instead:
image

Here’s the backend code:

$lastModified = (new DateTime())
    ->setTimezone(new DateTimeZone("GMT"))
    ->setTimestamp(filemtime(__DIR__ . "/../."))
    ->format("d F Y");

Eh… I don’t see how that is related?

@iamjustsomeguy is having trouble with the date() function, which implies to me that the server clock is not correct. Your code doesn’t look at the server time, but only at the modification time of the directory.

And looking at the modification time of your htdocs directory, it does actually say the 30th of October. So the PHP code is doing what it’s supposed to do.

You may want to double check what actually triggers the file mtime to be updated, and whether that’s a reliable metric for your update.

And if you want to talk more about this, please do so in a new topic.

2 Likes

I recently tried to reproduce this in http://kygekdev.infinityfreeapp.com, but the issue seems to be fixed already.

3 Likes

It might also have been a server specific issue which didn’t affect you in the first place.

I’ll believe the issue is fixed when @iamjustsomeguy says the issue is fixed.

5 Likes

Upon checking, it is now fixed. Thank you for yout help!

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.