remove date_default_timezone_set
Issue #186
resolved
Originally reported on Google Code with ID 186
that's not a good tone to set timezone for people.
p.s.
it doesn't save from warning, in fact, it generates it
Reported by ykorotia
on 2013-03-05 21:12:32
<hr> * Attachment: remove-timezone.patch
Comments (6)
-
-
Account Deleted hi If people specify date in php.ini - of course it will be fine, what you do - you just provide empty (UTC) value for date. Personally, I would remove it at all, I cannot remember any situation that required separate timezones. But if you want it as option - do as option.
Reported by
ykorotia
on 2013-03-07 06:52:33 -
You need to set a timezone for example if your hoster is in America (and has his timezone in php.ini) but you are in Europe for example. You'd somehow need to set the timezone for your scripts, or you would get date/time from another timezone. Okay, but I changed my mind. We don't make heavy use of date functions. In fact what I found is we only display the time when the db was changed last, insert the time in an sql dump and use the date as filename for exports. So I think it is not necessary to add an additional option only for that. As we disable display_errors in the current version (if $debug is false), the user won't be bothered with error messages. And I think it is good if PHP produces warning messages that appear in the log. Hopefully people will read their log oneday and realize that they should better specify date.timezone ;-) So we should remove date_default_timezone_set. Agreed. I have an idea on how we could make sure the date of the last change of db (and export date) is not interpreted wrong because it is in another timezone: We could simply append the timezone in which it is displayed. So instead of date('g:ia \o\n F j, Y',...) we do date('g:ia \o\n F j, Y (T)',...). This will end up in a string like this: "11:23pm on February 10, 2013 (CET)". I think the "(CET)" won't do any harm to anybody, but this way user can make sure the date is not in UTC and they think it is in CET (for example).
Reported by
crazy4chrissi
on 2013-03-07 12:00:03 -
(and we should make the date-strings language-dependent, but that's another issue).
Reported by
crazy4chrissi
on 2013-03-07 12:02:04 -
Fixed with r349.
Reported by
crazy4chrissi
on 2013-03-07 12:11:43 - Status changed:Fixed
-
Account Deleted cool idea with CET
Reported by
ykorotia
on 2013-03-07 16:14:34 - Log in to comment
Reported by
crazy4chrissi
on 2013-03-07 00:42:33 - Status changed:Accepted
- Labels added: Type-Enhancement - Labels removed: Type-Defect