iHackCode wrote:
...
So I guess the question is about locales, why is it used to set the timezone?
...
When the system stores a time value, it should be a system (preferably UTC) timestamp, so that data from all layers (web server, database, application, etc.) correlate. When it displays that timestamp, it needs to be expressed in a way useful to the user. That may include adjusting it to the timezone, and respecting whatever conventions are in place due to culture and/or language. That means that conversion for display in current timezone and adjusting user input of time data to UTC/sytem are completely locale dependent issues.
This is especially true of the user friendly relative times. Even a concept as seemingly simple as expressing "x days ago" can change drastically, not just by a direct translation of the phrase "days ago," but the value of x can change the entire expression. 1, 2 and 3 days cases could each be different.
http://www.unicode.org/repos/cldr-aux/charts/26/by_type/date_&_time.fields.html#Relative_Day
I agree it looks like formatTimestamp is mixing UTC and system timezone shifted elements.
For any follow up on this aspect, seehttps://github.com/XOOPS/XoopsCore/pull/240
Thanks!