Posts

Showing posts from December, 2009

An excellent PHP script to handle time difference

I am working on a project that involves displaying the time difference between a start and end time on a website. The following script is lifted directly from: http://aidanlister.com/2004/04/making-time-periods-readable/ /** * A function for making time periods readable * * @author Aidan Lister * @version 2.0.0 * @link http://aidanlister.com/2004/04/making-time-periods-readable/ * @param int number of seconds elapsed * @param string which time periods to display * @param bool whether to show zero time periods */ function time_duration($seconds, $use = null, $zeros = false) { // Define time periods $periods = array ( 'years' => 31556926, 'Months' => 2629743, 'weeks' => 604800, 'days' => 86400, 'hours' => 3600, 'minutes' => 60, 'seconds' => 1 ); // Break into peri

Things to do with an iPod and Fedora

My iPod Nano 8gb. ( not the fancy new one with the video ) works perfectly well inside fedora so long as you bear in mind the following basic points: The thing doesn't play ogg files so if you have any of those on your system, they can not be synced. Depending on the application you use, you end up with podcasts being saved under music. Sometimes you get images sometimes you don't. Albums with Various Artists do not appear under compilations. Instead your Artists menu shows a long list of artists most of which only have one track. Applications that ship with fedora and support the iPod: gtk-pod ( manage your ipod ) gpodder ( download podcasts etc - these actually go into the podcasts menu on the device. ) Amarok Rythmbox Other music applications I have played with that support the iPod: Songbird 2 I should not here that once again, I have found that Amarok 1.4 is still the best player out there. I had to install it using the F11 binaries ( just search for them on google ) and