Inconsistent behaviour date_i18n()
-
One would expect that date_i18n() adjusts the time to the local time zone. However, the plugin programmer may have to initialize time zone as follows:
date_default_timezone_set( get_option( 'timezone_string' ) );
This is only required once, so the behaviour of a plugin may depend upon the fact that maybe another plugin has set it already.
Would it not be better if date_i18n() should set the timezone on the first call so that simple plugin developers who are not aware of date_default_timezone_set() can rely on consistent behaviour of date_i18n()?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Inconsistent behaviour date_i18n()’ is closed to new replies.