[FX.php List] Simple PHP date math question
DC
dan.cynosure at dbmscan.com
Tue Sep 4 12:01:50 MDT 2007
the PHP datestamp is just the absolute number of seconds since some
fixed time in the past (i think it is 1/1/1970 in UNIX) so just add
86400 to the datestamp and your new datestamp will "be" the next day.
problems come up with daylight savings and time stamps around midnight
to 3AM so there are many tweaks to this basic formula. as long as you
use a time part that is midday you should be protected from daylight
savings changes. that is, assuming you only care about the day and not
the exact time!
YMMV.
dan
Bob Patin had written:
> I'm trying to take a date ($d1) and add a day to it; I know how to take
> today's date and do math with it, but can't seem to find the magic
> equation for doing date math on a date variable.
>
> Any help would be appreciated...
>
> Bob Patin
> Longterm Solutions
> bob at longtermsolutions.com
> 615-333-6858
> http://www.longtermsolutions.com
> Member of FileMaker Business Alliance and FileMaker TechNet
>
> CONTACT US VIA INSTANT MESSAGING:
> AIM or iChat: longterm1954
> Yahoo: longterm_solutions
> MSN: tech at longtermsolutions.com
> ICQ: 159333060
>
> --------------------------
> Contact us for FileMaker hosting for all versions of FileMaker
> PHP • CDML • Full email services • Free DNS hosting • Colocation •
> Consulting
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
More information about the FX.php_List
mailing list