Can anyone explain to me why the Movable Type activity log insists on using UTC instead of my local time zone?
|Date||IP Address||Log Message|
|2005.06.04 22:20:42||127.0.0.1||‘Ray Baxter’ added entry #75|
I can see that the time is logged in the data base in UTC so this report is pretty straightforward. Other dates in the database are in my local time zone, for instance the date of this post down there to the lower left.
Why the are the log files different?
On possibility is that there needs to be a common time for all of the different blogs. I am currently using 3 different blogs on this same installation of Movable Type. The time zone is a property of the individual blogs, so it could differ from blog to blog.
Looking at the code, it appears that the time zone offset is only a property of a blog, so the time for a log entry stuffed into the database is UTC and the time displayed out ditto. This could be modified in either place, but I don’t know enough about the code to have any clue which one would be better.
Ideally, this should be a configurable parameter in mt.cfg. Then it would pertain to all blogs.
Combining multiple updates There is a configurable parameter. It is called TimeOffset. It is documented in the Movable Type manual.
The default value of TimeOffset is 0. Setting
TimeOffset -8 in mt.cfg sets the server time to Pacific Standard Time. The additional hour offset for daylight saving is accounted for separately in the code. The standard templates say, “All times displayed in GMT.” This is no longer true once I set TimeOffset so I modified an alternate view_log template, removing that sentence.
Sorry, comments for this entry are closed at this time.