Working with date() in PHP

Date is a import for repoarting system. Sometime, we forget about the date(). I forget about some function in date() and I have many problem occur in reporting system.

First thing is minute. I though, minute is a m and so I use like that date(“h:m:s”); It was wrong. Minute use i not m.  You can check in there. Another problem is a time zon. date() also retrive the UTF time zone and we need to config it. I found that in It’s very suitable but I use like that.

putenv(“TZ=Singapore”); $sg_day=date(“m-d-y H:i”);

It’s a short and easy to understand. So, I use like that and config timezone to singapore. Now, my reporting system corrected and I was happy for learning about date() function.



comments powered byDisqus