mirror of
https://github.com/pelican-dev/panel.git
synced 2026-05-04 18:00:48 +03:00
[PR #468] [MERGED] Fix default timestamp for activity logs #778
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/pelican-dev/panel/pull/468
Author: @Boy132
Created: 7/8/2024
Status: ✅ Merged
Merged: 7/10/2024
Merged by: @Boy132
Base:
main← Head:fix/activity-log-timestamp-timezone📝 Commits (2)
4be948afix default timestamp for activity logs97aec8afix phpstan📊 Changes
2 files changed (+32 additions, -0 deletions)
View changed files
📝
app/Models/ActivityLog.php(+4 -0)➕
database/migrations/2024_07_08_112948_fix-activity-log-timestamp-default.php(+28 -0)📄 Description
The
timestampcolumn for activity logs usesuseCurrentwhich sets the default column value toCURRENT_TIMESTAMP. But this uses the database timezone.This causes the timezone to be "added twice" on the frontend.
Example with


Europe/Berlin:This PR removes the default and sets the timestamp to
Carbon::now()when the model is created.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.