Incorrect Timestamp in the View Lesson Plan Chat Section

This question applies to the Chat Section at the bottom of the “View Lesson Plan”

Gibbon Version: v27.0.01
PHP Version: 8.2.18
MySQL Version: 5.7.23

SETTINGS
Server Settings > Localisation > Timezone: America/New_York

SYSTEM
Server Info > DATE > Default timezone: America/New_York
Server Info > DATE > date.timezone: America/New_York

Problem!
We recently started using the Chat section for in lesson discussions and there is a cutoff time of 6:00 PM on Fridays for lesson discussions.

Several student’s were graded for posting their comments late, and they protested stating that they posted before the cutoff time.

In troubleshooting the issue, I’m seeing that the timestamp for the posts and comments has as +9.5 hours the actual posting time.

For example, a student or teacher makes a post/comment at 10:00 AM on 9/16/2024. The resulting timestamp is “Posted at 19:30 on 09/16/2024”.

This error creates a UTC/GMT +5:30 hours timestamp
Whereas our server time is UTC/GMT -4 hours (EDT)

How can I correct this in Gibbon, other than selecting a different timezone in the settings, which throws off the times for the rest of the installation?

Hmm, that is very strange, as it looks like those timestamps are set by the database when the record is created. I wonder if there’s a possibility that your MySQL database has a different timezone set than your server itself. If you were to run a SELECT NOW() command via SQL, do you see the correct timezone or an incorrect one? It looks like there are some globals that control the MySQL timezone.

Thanks for getting to this.

I ran the SELECT NOW() command and the timestamp shown in the SQL was incorrect.

I’m now working with the hosting company to get the issue fixed on their end.

1 Like