background preloader

Croppic

Croppic

To GMT or not to GMT Montreal, Canada Wednesday, February 29th 2012, 11:18 EST A leap day with a post on Date/Time issues seems fitting... Earlier today, on twitter, @skoop asked: "dear #lazyweb, when I use DateTimeZone('GMT'), why does format('e') output UTC?" What he means is that: $date = new DateTime('now', new DateTimeZone('GMT')); echo $date->format(DateTime::RFC2822 . ' e' ); which shows: Wed, 29 Feb 2012 16:26:23 +0000 UTC As you can see that has UTC and not GMT as you might expect. If you look closely at the documentation for the "Other" group of timezones, it lists with the GMT timezone as warning: "Please do not use any of the timezones listed here (besides UTC), they only exist for backward compatible reasons." $date = new DateTime('now', new DateTimeZone('GMT')); var_dump($date); Now apparently some systems *cough*Silverlight*cough* require GMT to be used. $date = new DateTime('today GMT'); var_dump( $date ); Things like this also work: And of course, this is not limited to GMT only:

How to Create a Accordion Menu (CSS3+jQuery) [Tutorial] Topic: jQuery / CSS3Difficulty: IntermediateEstimated Completion Time: 30 mins As you may noticed a few days ago we released a tutorial about How to Create an Accordion Menu in Pure CSS3. As this pure CSS3 Accordion Menu will not work on all browsers because the :target selector in not supported in the oldest browsers we decided to create a jQuery version of this menu. Also jQuery offers more stability and cross browser compatibility support so if you want to provide to your visitors/client a better product you may consider use this jQuery version. Before you start reading this tutorial I recommend you to read the CSS3 Version as we will not cover all the steps and will focus only on the changes that need to be done for the jQuery version. Step 1 – HTML Markup The HTML is the same as the CSS3 version, a nested unordered list which will contain all of our links. Step 2 – CSS Styling The changes in the CSS code are very basic. Step 3 – jQuery We will start by storing this two variables.

Related: