 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Ibuildings techPortal: Tips for PHP Date and Time Functions
by Chris Cornutt January 26, 2010 @ 10:06:57
In this new post from the Ibuildings techPortal today Michael shares some handy tips for working the date and time functions in PHP (all can be used in a non-PHP 5.3 installation).
His tips for these very handy functions include:
- A Unix timestamp is never timezone-specific; if you call time() at the same moment on computers in different time zones, you get exactly the same value back.
- The time string is interpreted as a local time; there is no gm- equivalent [of strptime], or even any way to simulate one, since it ignores the value of date_default_timezone_set. Note that you can impose a timezone on the input string if it contains a timezone abbreviation or offset.
- [With date/gmdate] as with strftime/gmstrftime, the gm- prefix affects whether the result is a representation of the time in the current timezone or in the UTC timezone.
- How does PHP know what your current timezone is? It tries a few different places, including the TZ environment variable and the date.timezone ini option.
voice your opinion now!
date time tip feature
PHPFreaks.com: Working with dates in PHP
by Chris Cornutt August 20, 2009 @ 11:38:51
On PHPFreaks.com today there's a new tutorial looking at working with dates and times in PHP. This includes timezone support and date manipulation.
There are many topics on the forums that go again, topics many people often are having trouble with. One of these problem areas are how to handle dates, convert them to a different format, timezone issues, etc. This tutorial will attempt to address many of the commonest problems related to date and time issues.
Besides looking at some of the common date/time issues that developers might face, they also touch briefly on storing dates in a database and offer some recommendations as to a few best practices to help keep things straight.
voice your opinion now!
date time tutorial database
Federico Cargnelutti's Blog: Format a time interval with the requested granularity
by Chris Cornutt June 25, 2009 @ 12:56:51
Federico Cargnelutti has posted a class (DateIntervalFormat) that gives you the difference between a date and "now" in words rather than an integer.
This class, a refactored version of Drupal's format_interval function, makes it relatively easy to format an interval value. The format will automatically format as compactly as possible. For example: if the difference between the two dates is only a few hours and both dates occur on the same day, the year, month, and day parts of the date will be omitted.
So, instead of getting a value of "86400 seconds" you'd get back something like "5 days 3 hours".
voice your opinion now!
tutorial granularity time format
ParticleTree Blog: PHP Quick Profiler
by Chris Cornutt April 24, 2009 @ 07:57:01
Debugging resources being used by your script has always been a pain, and many developers have come up with their own libraries to handle the process. Ryan Campbell has his own entry in the category - the PHP Quick Profiler.
In our company, code reviews play an integral part in the development process for making quality software. We opt for a mentor style approach with Wufoo, where a developer works on a segment for a period of time and then passes it up to a more experienced developer for review.
[...] To reduce this repetition of checking the same requirements over and over], we invested some time creating something we've called the PHP Quick Profiler-we call it PQP for short. It's a small tool (think Firebug for PHP) to provide profiling and debugging related information to developers without needing them to add a lot of programmatic overhead to their code.
The post gives several screenshots of the tool in action and code to get you up and running quickly. The Profiler can keep track of memory usage, "runaway" includes, execution time and database activity. There's also an online demo so you can try it out yourself.
Here's the link to the latest version's download.
voice your opinion now!
demo time execution include database usage memory profile
Ibuildings techPortal: Buy vs. Build
by Chris Cornutt April 15, 2009 @ 16:32:55
On the Ibuildings techPortal site Stefan Koopmanschap has written up some thoughts on one of the eternal struggles development shops face - whether to buy or build the software they need (either for themselves or their clients).
One of the biggest struggles in any software development company is "Buy vs. Build". How do you strike a balance between writing custom software and purchasing off-the-shelf solutions. This is something that is very hard and everyone gets it wrong every once in a while. In this article we will explore the way that Ibuildings approaches this issue, in the hopes that it helps others in getting it right more often.
He talks about considerations made on both sides - how flexible is the application, what is on-hand that could be adapted - and how the base product they might have purchased can act as a based to work from (like a content management system). There's no overall recommendation, though - too much of the decision depends on what's needed at the time and the capabilities of the technical staff employed.
voice your opinion now!
buy build techportal develop consideration cost time
PHPBuilder.com: PHP and Adobe Air Building a Time-tracking and Billing Application - Part II
by Chris Cornutt April 07, 2009 @ 07:54:44
PHPBuilder.com has posted the second part of their series on creating a sample application - a time tracking app - with PHP and Adobe Air.
Welcome back. In part 1 of this series, you created some PHP remote services and the Clocked! widget application. Part 2 covers PHP administration and completion of the timer widget.
They're developing a Flex-based application (rather than the HTML/Javascript combo that can also be used with Air) so they'll be doing their work in Flex Builder. They set up a few placeholder functions like getClients, getProjects and getProjectsResult as well as support for the ticket and timer objects. Add in a few interface items like dropdowns for client and project selection and a start/stop button and you have the basic app laid out. The PHP interface to all of this Flex code comes in the next article of the series.
voice your opinion now!
time track air adobe tutorial series billing application flex builder
PHPBuilder.com: Building a time-tracking and billing application with Adobe AIR and PHP
by Chris Cornutt March 19, 2009 @ 07:58:59
On PHPBuilder.com today there's a new tutorial by Richard Bates that will walk you through the creation of a simple time tracking application that combines the Adobe Air and PHP technologies to make a simple desktop client.
The scenario calls for a lightweight, cross-platform desktop application that does its job and stays out of the users' way. It also needs a powerful management interface that can be accessed from anywhere. To address both needs, you first create a desktop application for AIR that leverages PHP back-end services for persistent storage and extra horsepower. Then, you create a simple and quick PHP/Hypertext Markup Language (HTML) browser-based interface for management and output applications.
The Air client is really just a frontend to the PHP backend located on the server (so there's no need to install PHP locally too). The system is based around a few objects - the Client, a Project, a time-tracking Ticket and an Invoice for the time spent. To make things simpler, he uses an instance of the Zend Framework to do most of the heavy lifting on the backend.
The rest of this article sets up the backend scripts - creating the service interface and making some of the initial methods (like getClients and logIn). The next part in the series will get into the actual Air application.
voice your opinion now!
air adobe desktop time track application tutorial
|
Community Events
Don't see your event here? Let us know!
|