In respect of timezone, there is a difference between PHP5 version and operating systems and the process environment.
[1] strftime() generates E_NOTICE/E_STRICT/E_WARNING if the process doesn't have its own timezone settings.
http://jp.php.net/manual/en/function.strftime.php
SVN1106 XAMPP上でのテスト結果
http://japan.nucleuscms.org/bb/viewtopic.php?p=26632#p26632
[2] Under old Windows, if the format includes multi-byte strings, the parse is stopped within the string.
Re: Nucleus CMS 4.0の開発に関して
http://japan.nucleuscms.org/bb/viewtopic.php?p=27004#p27004
FYI:
setlocale, _wsetlocale
http://msdn.microsoft.com/en-us/library/x99tb11d.aspx
To keep the consistency of datetime, the expression of timestamp should be based on UTC and its time differences. Then we don't mind the server environments.
For issue [2], I wrote i18n::strftime(). This method splits the format with some tokens and just post the token with % into parser. Then multi-byte strings are not passed into parser.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1530
I read PHP's C source codes related to timezone.
/[svn]/php/php-src/trunk/ext/date/php_date.c
(Revision 320481: the recent one)
/[svn]/php/php-src/trunk/ext/date/php_date.h
(Revision 321634: the recent one)
Some functions related to timezone generates warnings or errors,
when then call get_timezone_info(). get_timezone_info() calls guess_timezone(),
which check timezone by four steps below.
1. get from date_globals.timezone structure and return if exists
2. get from date.timezone PHP directive
if date_globals.default_timezone structure doesn't exist and return if valid
3. get from date_globals.default_timezone structure and return if valid
4. return error or warning message if failed these three steps
But strftime()/gmstrftime() have an additional step.
5. call C library's strftime implementation.
In this case, to get expected time expression,
we should utilize PHP's setlocale().
So for avoiding the error/warning messages,
1. don't use strftime()/gmstrftime().
Then we don't need to set C library's locale setting.
2. utilize date() and time() functions instead of them.
3. we need wrapper functions for datetime system to handling timezone.
For PHP 5.1.0 or later, set timezone in PHP's datetime system,
For PHP 5.1.0 or early, utilize our own datetime system (not implemented).
Some issues for Backward compatibility:
The strftime subsystem utilize different format than the datetime subsystem.
Unfortunately Nucleus CMS's templates heavily based on
the way of strftime subsystem.
Time variables overview
http://docs.nucleuscms.org/nucleus/documentation/help.html#strftime
strftime — Format a local time/date according to locale settings
http://www.php.net/manual/en/function.strftime.php
date — Format a local time/date
http://www.php.net/manual/en/function.date.php
For your information:
#define DATE_TZ_ERRMSG
http://svn.php.net/viewvc/php/php-src/trunk/ext/date/php_date.c?revision=320481&view=markup#l730
guess_timezone()
http://svn.php.net/viewvc/php/php-src/trunk/ext/date/php_date.c?revision=320481&view=markup#l845
PHP_FUNCTION(date_default_timezone_set)
http://svn.php.net/viewvc/php/php-src/trunk/ext/date/php_date.c?revision=320481&view=markup#l845
define DATEG(v)
http://svn.php.net/viewvc/php/php-src/trunk/ext/date/php_date.h?revision=321634&view=markup#l159
date_format()
http://svn.php.net/viewvc/php/php-src/trunk/ext/date/php_date.c?revision=320481&view=markup#l942
php_strftime()
http://svn.php.net/viewvc/php/php-src/trunk/ext/date/php_date.c?revision=320481&view=markup#l1509