sarfraznawaz2005/visitlog

Error if visit is during 1st hour of BST

Opened this issue · 0 comments

An untrapped error occurs if a page is visited during the first hour of BST change.

At 01:00 on 27/03/2022, the clocks changed from 01:00 to 02:00 as we move from GMT to BST in the UK

Visits to the page between 2am and 3am appeared to cause an "invalid date/time format" error to be returned by Mysql (or a server error 500 if configured in production to do so)

This is likely to do with webserver/db server configuration being different in terms of the timezone configuration, but this is not something users on shared hosts have access to and this issue could be better handled in the codebase.

It was confirmed that Visitlog was causing the issue - as access to the pages were permitted immediately the call to VisitLog(); was commented out of the page, and the error re-occurred once the Visitlog(); command was put back in.

The issue ceased to occur after the first hour of BST had passed, (I assume because the web and DB server times became re-aligned.)