Skip to content

Instantly share code, notes, and snippets.

@whym
Created March 16, 2011 06:06
Show Gist options
  • Select an option

  • Save whym/872090 to your computer and use it in GitHub Desktop.

Select an option

Save whym/872090 to your computer and use it in GitHub Desktop.
MediaWiki の LocalSettings.php に追記して、デフォルトタイムゾーンをJSTにするための設定
# see also http://www.mediawiki.org/wiki/Manual:Timezone#Primary_Method
#Set Default Timezone
$wgLocaltimezone = "Asia/Tokyo";
$oldtz = getenv("TZ");
putenv("TZ=$wgLocaltimezone");
# Versions before 1.7.0 used $wgLocalTZoffset as hours.
# After 1.7.0 offset as minutes
$wgLocalTZoffset = date("Z") / 60;
putenv("TZ=$oldtz");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment