-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong time for 'Welcome' entry #99
Comments
As we are already talking about the 'Welcome' entry:
|
Adds the welcome entry to the Author FlatPress. Also for the static pages menu and about. See flatpressblog#99 (comment)
I could not reproduce the problem with RC1. The welcome entry is created with the UTC time (Germany/ winter time). |
I don't use FP anymore. |
@bttrx It rings a bell. That's a shame. You always see each other twice. I would be delighted if you could join us again. All the best |
@azett and @DeltaLima: Please check whether the problem still exists. I can no longer reproduce it with RC1. Note: FlatPress uses UTC and a time offset, which can be changed decimally in the admin area. If the problem is no longer reproducible, please inform the cleaning lady |
Addition (time welcome entry): Seems a bit problematic to work with the timeoffset 2 by default in the welcome entry. We still distinguish between winter and summer time - how old-fashioned. The time() function uses the default timezone from php.ini. If this is set correctly, we have no problem here. The setup uses the time() function, so I could not reproduce the error on my test system. flatpress/setup/lib/step2.lib.php Line 14 in 71ba1bc
On the other hand, it is the welcome entry, which is deleted before productive operation. Newly created entries are created with UTC + timeoffset. |
Tested this with latest FP. PHP runs in time zone "Europe/Berlin" / CET / UTC+1. FlatPress installed at 11:37 local time. Welcome entry says "Posted by FlatPress at 10:37:24", so its generation time is still set in UTC. More important: New entry added at 11:40 local time, but is displayed as "Posted by admin at 12:40:31". The installer has set the time offset to "2", but should have set "1" (CET) until Mar 31. After that, "2" would be correct (CEST). Edit: Added this to the 1.3 milestone. |
@Fraenkiman @DeltaLima Can you please check if my 9f71fcc works properly, maybe with different date.timezone settings in php.ini? Thanks a lot :) |
Hi!
I installed fp-1.2.1 to a Synology DiskStation.
During setup FlatPress creates a 'Welcome' entry to showcase some features.
I did the setup at 7pm CEST and that's also what the DiskStation's file manager shows for the modified date of the corresponding entry*.txt file.
But in FlatPress' frontend and backend this entry is shown as it was created at 5pm. Filename on the DiskStation is entry220418-170052.txt.
DATE timestamp inside the .txt file is
1650301252
. According to https://unixtime.org/ this represents 'GMT | Mon Apr 18 2022 17:00:52 GMT+0000' or 7pm CEST.A user creating his/her first entry now, will get 7:..pm for that entry and is probably confused by the 2-hour difference.
FP's ships with a time offset of 2 hours. This offset should also be applied when creating the 'Welcome' entry.
Best would probably be to already ask the user during setup for the right time offset.
The text was updated successfully, but these errors were encountered: