Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 381555 - www-apps/mantisbt-1.2.4 uses date_default_timezone_get() function
Summary: www-apps/mantisbt-1.2.4 uses date_default_timezone_get() function
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Low trivial (vote)
Assignee: Peter Volkov (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-02 11:15 UTC by Johannes Geiss
Modified: 2011-10-02 18:32 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Geiss 2011-09-02 11:15:06 UTC
This function produces a warning message on every mantis-page.

Reproducible: Always

Steps to Reproduce:
1. Just use MantisBT. It's can be seen at the login page.

Actual Results:  
Every Webpage of MantisBT shows the following warning:

SYSTEM WARNING: date_default_timezone_get() [function.date-default-timezone-get]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead

Expected Results:  
No warning.

Portage 2.1.10.3 (default/linux/powerpc/ppc32/10.0/desktop, gcc-4.4.5, glibc-2.12.2-r0, 2.6.38-gentoo-r6-polaris ppc)
=================================================================
System uname: Linux-2.6.38-gentoo-r6-polaris-ppc-7447-7457,_altivec_supported-with-gentoo-2.0.3
Timestamp of tree: Mon, 25 Jul 2011 06:15:01 +0000
app-shells/bash: 4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python: 2.7.1-r1, 3.1.3-r1
dev-util/cmake: 2.8.4-r1
dev-util/pkgconfig: 0.26
sys-apps/baselayout: 2.0.3
sys-apps/openrc: 0.8.3-r1
sys-apps/sandbox: 2.4
sys-devel/autoconf: 2.13, 2.68
sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils: 2.20.1-r1
sys-devel/gcc: 3.4.6-r2, 4.4.5
sys-devel/gcc-config: 1.4.1-r1
sys-devel/libtool: 2.2.10
sys-devel/make: 3.82
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc: 2.12.2
Repositories: gentoo private-overlay
ACCEPT_KEYWORDS="ppc"
ACCEPT_LICENSE="* -@EULA"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -fno-strict-aliasing -fomit-frame-pointer -pipe"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -fno-strict-aliasing -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical --nospinner --quiet-build --usepkg --binpkg-respect-use=y"
FEATURES="assume-digests binpkg-logs buildpkg distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://de-mirror.org/distro/gentoo/ [^] ftp://de-mirror.org/distro/gentoo/ [^] "
LANG="en_US.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en de"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" [^]
USE="X Xaw3d a52 aac acl alsa altivec berkdb bluetooth branding bzip2 cairo cdda cdr cgi cjk cli consolekit cracklib crypt css cups cxx dbus device-mapper dri dts dvd dvdr dvi emboss encode esd exif extensions extras fam fastcgi fat ffmpeg firefox flac fontconfig fortran fuse gd gdbm gdu gif gnutls gpm gtk hfs iconv icu id3tag imagemagick imap ipv6 jfs joystick jpeg kpathsea lcms ldap libnotify mad mikmod mng modules mp3 mp4 mpeg mudflap mule musicbrainz mysql ncurses nls nptl nptlonly nsplugin ntfs ntfsprogs objc odbc ogg opengl openmp pam pango pcre pdf perl png policykit ppc ppds pppd private-headers python qt3support qt4 readline reiserfs sasl sdl server session spell sqlite srt ssl startup-notification stream svg sysfs tcpd theora tiff timidity truetype twolame udev unicode usb vamp videos vorbis xcb xfs xml xorg xulrunner xv xvid zlib" ALSA_CARDS="via82xx" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Peter Volkov (RETIRED) gentoo-dev 2011-09-06 04:42:16 UTC
Thank you for report. Please try with 1.2.7-r1 and if problem persists report upstream:
http://www.mantisbt.org/bugs/plugin.php?page=ManTweet/index.php
Comment 2 Johannes Geiss 2011-09-06 09:36:20 UTC
(In reply to comment #1)
> Thank you for report. Please try with 1.2.7-r1

I have tried 1.2.7-r1 but the warning persists.

> and if problem persists report
> upstream:
> http://www.mantisbt.org/bugs/plugin.php?page=ManTweet/index.php

Sorry, I don't use Twitter and don't have an account. Could you report this, please?
Comment 3 Peter Volkov (RETIRED) gentoo-dev 2011-09-06 10:30:09 UTC
(In reply to comment #2)
> > http://www.mantisbt.org/bugs/plugin.php?page=ManTweet/index.php
> 
> Sorry, I don't use Twitter and don't have an account. Could you report this,
> please?

This is not a Twitter but just another mantis installation ;) I'm asking _you_ to report since upstream most probably will ask you questions about your configuration, I'd like to avoid additional delays in communication and job for me, if possible.
Comment 4 David Hicks 2011-09-06 11:17:51 UTC
Peter, thanks for adding me to the CC list.

Johannes, the quick fix is to add the following to config_inc.php:

$g_default_timezone = 'UTC';

Where 'UTC' is a value that is a valid PHP timezone from http://us.php.net/manual/en/timezones.php

MantisBT 1.2.x was originally designed to work with PHP 5.1 (it is still compatible with this older version of PHP - although *NOT* recommended for security/upstream supportability reasons). In PHP <5.3 the use of date_default_timezone_get() was considered OK (no warnings).

PHP 5.3 changes this situation by requiring the timezone to be set in the date.timezone INI setting (http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone) or be specified manually by each PHP script.

It's probably a good idea to add a date.timezone configuration value to your PHP 5.3 configuration files (CGI, CLI, etc). You can alternative specify it manually in MantisBT using the config_inc.php approach I mentioned above.

I hope this information is of assistance. Please let me know if you have further questions/problems.

David
Comment 5 Johannes Geiss 2011-09-06 11:24:55 UTC
(In reply to comment #3)

> This is not a Twitter but just another mantis installation ;) I'm asking _you_
> to report since upstream most probably will ask you questions about your
> configuration, I'd like to avoid additional delays in communication and job for
> me, if possible.

Sorry I misunderstood this. I did it now:
http://www.mantisbt.org/bugs/view.php?id=13293
Comment 6 Johannes Geiss 2011-09-06 11:39:34 UTC
(In reply to comment #4)

> $g_default_timezone = 'UTC';

Thank you. This fixed the issue.
Comment 7 Peter Volkov (RETIRED) gentoo-dev 2011-10-02 18:32:06 UTC
Thank you, David for detailed explanation. Closing bug then. Personally I prefer to specify timezone in php.ini.