Skip to content
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

Closed
bttrx opened this issue Apr 18, 2022 · 9 comments
Closed

Wrong time for 'Welcome' entry #99

bttrx opened this issue Apr 18, 2022 · 9 comments
Milestone

Comments

@bttrx
Copy link

bttrx commented Apr 18, 2022

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.

@bttrx
Copy link
Author

bttrx commented Apr 18, 2022

As we are already talking about the 'Welcome' entry:

  1. The author for this entry should be set to 'FlatPress'. Otherwise using the Leggero theme it reads: 'Posted by at 17:00:52'.
  2. A typo to fix: 'sourrounding' -> 'surrounding'.

azett added a commit that referenced this issue Jun 18, 2022
@azett
Copy link
Member

azett commented Jun 18, 2022

Thanks for reporting!
Current status:

  • Timezone problem
  • Missing author (fixed with ce8d511)
  • Typo (fixed with f465c79)

Possibly related to #113 and #116!

Fraenkiman added a commit to Fraenkiman/flatpress that referenced this issue Mar 26, 2023
Adds the welcome entry to the Author FlatPress.
Also for the static pages menu and about.

See flatpressblog#99 (comment)
@Fraenkiman
Copy link
Collaborator

Fraenkiman commented Mar 25, 2024

I could not reproduce the problem with RC1. The welcome entry is created with the UTC time (Germany/ winter time).
@bttrx, can you still reproduce the problem with FlatPress 1.3 RC1?

@bttrx
Copy link
Author

bttrx commented Mar 25, 2024

I don't use FP anymore.

@Fraenkiman
Copy link
Collaborator

@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

@Fraenkiman
Copy link
Collaborator

Fraenkiman commented Mar 26, 2024

@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

@Fraenkiman
Copy link
Collaborator

Fraenkiman commented Mar 27, 2024

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.

'date' => time(),

On the other hand, it is the welcome entry, which is deleted before productive operation. Newly created entries are created with UTC + timeoffset.

@azett
Copy link
Member

azett commented Mar 29, 2024

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.

@azett azett added this to the FlatPress 1.3 milestone Mar 29, 2024
@azett azett closed this as completed in 9f71fcc Mar 29, 2024
@azett
Copy link
Member

azett commented Mar 29, 2024

@Fraenkiman @DeltaLima Can you please check if my 9f71fcc works properly, maybe with different date.timezone settings in php.ini? Thanks a lot :)

azett added a commit that referenced this issue Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants