PHP and timezone conversions

Posted by Luca on March 29th

This morning I was working on setting up the different timezones in Juvely and was amazed that PHP does not (currently) have any easy to use functions for converting between different timezones. We have all the times and dates stored as GMT in the database, and use the following to get a certain time into a format MySql understands:

$time = gmdate(’Y-m-d H:i:s’);

To then get it back into a timestamp when retrieving stuff from the database I originally used the following:

$time = strtotime($db_time);

To change the timezones I decided to just use date_default_timezone_set($timezone), which changes the timezone in which all date functions work. I got confused for a while as to why when I had it set to Paris and London it displayed the same time. Then I realised that strtotime() is a date function as well so that thinks the time being parsed to it is the local time.

Luckily it turns out that there is an easy solution to this to make strtotime() behave as I intended, just append GMT to the end of the time and it will know it is in GMT! I am not sure how this would work for other timezones but I would imagine you would just do something like GMT-0800 if the timezone is 8 hours behind.

The full code of how this would work goes like this:

date_default_timezone_set(’Europe/Paris’);
$time = strtotime($db_time . ‘ GMT’);
echo ‘It is ‘ . date(’jS of F, Y g:i a’);

First UI/design updates

Posted by James on March 27th

Over the last two days i have been working on a number of different UI’s for Juvely, because of the nature of our application, there will be two different sections. Firstly one for our customer (known as a staff member), this is where they will manage all the relevant information to do with their account. Then secondly, we will have a section for the clients of our customer. One of the decisions I was faced with was simplicity over beauty, sure it’s easy enough to make a nice looking website, but because of the nature of our app, simplicity/usability has to come first.

Here is one I have managed to come up with (it has been edited for obvious reasons).

dashboard

Would love to hear peoples thoughts, it’s not finished, still plenty of things to tinker with, so I’m completely open to suggestions!

Another blogged startup - Ringside Startup

Posted by Luca on March 27th

Steve Poland, of Techquila Shots is starting Ringside Startup and also blogging about the process. Rather than just telling readers what is happening though, he is encouraging them to participate in business decisions and has a number of advisors on board to educate them on what is happening.

“I’m raising $20,000 from readers/sponsors — to enlighten everyone’s entrepreneurship education. With the contributions, I’m going to launch a web start-up (one of the Techquila Shots ideas) and blog the entire journey. … The goal is for entrepreneurs to learn from all the processes and obstacles I go through — and gaining insight along the way from seasoned professionals.”

So no only is he blogging about it, he also has a good plan of how to raise money! If you have read Techquila Shots you will see that quite a few of his ideas are explained in quite a lot of detail, so I think he will do well - although other people do not agree.

The site officially launched last Sunday night, and unfortunately things didn’t go so well. Steve pointed out that he got the site onto Digg too early and also choose to announce his startup at the busiest time of the week for bloggers.

Anyway, keep an eye on this as I expect Ringside Startup will be getting a lot of press in the next few weeks!

Next Page »