Article View: pl.comp.lang.php
Article #230433Re: jak wygenerować datę
From: xantiros
Date: Tue, 27 May 2014 11:13
Date: Tue, 27 May 2014 11:13
16 lines
1638 bytes
1638 bytes
W dniu 2014-05-26 09:14, Borys Pogoreło pisze: > Dnia Sun, 25 May 2014 05:57:17 +0000 (UTC), astro napisał(a): > >> http://pl.wikipedia.org/wiki/Czas_uniksowy >> wiec wystarczy do tej wartosci dodac/odjac ilosc sekund - w tym wypadku, >> jakie uplynely w ciagu 31 dni. >> >> $date = time() - (31 * 24 * 60 * 60); > > ... zakładając, że liczysz tuż po północy, a w badanym okresie nastąpiła > zmiana czasu, to zgadnij co wyjdzie. > no to użyje klasy DateTime i tam ma wszystko co potrzeba http://www.php.net/manual/en/class.datetime.php
Technical Details
Message-ID:
<lm1s0n$c2p$1@node1.news.atman.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mailReferences:
<llo75h$ahk$1@node1.news.atman.pl> <lls0ns$lm5$1@portraits.wsisiz.edu.pl> <crb4wrdd64pq$.n4bez0rtc943.dlg@40tude.net>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail From: xantiros <_wytnij_to_xantiros@ymail.com> Newsgroups: pl.comp.lang.php Subject: Re: jak wygenerować datę Date: Tue, 27 May 2014 13:13:23 +0200 Organization: ATMAN - ATM S.A. Lines: 16 Message-ID: <lm1s0n$c2p$1@node1.news.atman.pl> References: <llo75h$ahk$1@node1.news.atman.pl> <lls0ns$lm5$1@portraits.wsisiz.edu.pl> <crb4wrdd64pq$.n4bez0rtc943.dlg@40tude.net> NNTP-Posting-Host: 89-70-28-167.dynamic.chello.pl Mime-Version: 1.0 X-Trace: node1.news.atman.pl 1401189207 12377 89.70.28.167 (27 May 2014 11:13:27 GMT) X-Complaints-To: usenet@atman.pl NNTP-Posting-Date: Tue, 27 May 2014 11:13:27 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: <crb4wrdd64pq$.n4bez0rtc943.dlg@40tude.net> X-Antivirus: avast! (VPS 140527-0, 2014-05-27), Outbound message X-Antivirus-Status: Clean Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit