Text or Email me for a quote...Tel: 07740 197 213 | Email: moc.erusserpol@notron
From Elite by Design: a New premium WordPress theme, The Wall.
How to set your default sNews timezone using date_default_timezone_set
I live in Scotland while my website is hosted in Pittsburgh, USA. As sNews uses the server time to timestamp submissions my articles have the 'wrong' date-time - each article shows a time that is 5 hours behind my local time, the time at which I created and submitted the article.
There is no setting within the sNews Administration console that allows me to adjust the time zone. It's necessary to open snews.php and add the following code, somewhere near the top of the file.
// Set local timezone
date_default_timezone_set('Europe/London');
The function date_default_timezone_set() has been available since PHP v5.1.
I have used Europe/London
(I could have used Europe/Dublin, or Europe/Edinburgh - each is within the same time zone as my home town). Replace Europe/London with your own choice from this list.
An alternative method is to use
php_value date.timezone 'Europe/London'
in your .htaccess file.
Mon Aug 2009 20:25
Articles
- Web design tools and resources
- Create a retro-urban gig poster using Photoshop
- Tau and Tau Day
- How I Moved My Website to a New Bluehost Account
- Email Obfuscation
- Free photoshop textures
- Search Engine Optimisation
- Good, fast, cheap
- How to set your default sNews timezone using date_default_timezone_set
Extra
- Terms & Conditions
- Privacy Policy
- Environmental Policy
- LoPressure runs on the wonderful sNews CMS and is hosted by the excellent pair Networks
