You could use pack/unpack as well. Try that, its untested, seems to work okay in my head.
Also, to adjust a timezone, you may use date_default_timezone_set if you want it to change, otherwise it will attempt to find the closest timezone the server is in. You can never base this on a client; to do that you'd need to determine the times data was written, which would be doable in a database.
You are combining both filesystem and database. Is there a reason for you doing this?
If you are using a database, you can simply record the date of a hit. SQL can then issue a COUNT for the date with a GROUP BY and a WHERE clause to determine the hits for a day. You don't even need to add a counter if you don't want, just an insert would work fine. Then a simple SELECT count(date_counter) AS count FROM counter WHERE date_counter = CURRENT_DATE() for example. You can use group by if you want to list multiple dates.
I'd prune them out regularly though. Whether you choose to use a single insert per hit (which will grow fast), or execute an UPDATE instead, chances are you don't need to keep everything for an extended period. If you have no intention of tracking unique entries, then an UPDATE may make more sense. If you want to track unique, then a single entry is the way to go. If its for esthetics only, I'd make it a MEMORY table type as well. It'll disappear on a MySQL restart, but its faster for accessing.