Re: Time Problem: always ten past xx
| From: | Matthias Laug | Date: | Tue, 06 Oct 2009 08:07:28 +0000 |
| Subject: | Re: Time Problem: always ten past xx | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-298634@lists.php.net to get a copy of this message | ||
argh, why do I always stick to the stupid questions :( sorry
Am 06.10.2009 um 10:03 schrieb Mert Oztekin:
You also write the answer var_dump(strftime("%d.%m.%Y %H:%m",$time)); there are 2 %m you see? %m is month :) for minute use %i -----Original Message----- From: Matthias Laug [mailto:matthias.laug@gmail.com] Sent: Tuesday, October 06, 2009 10:53 AM To: php-general@lists.php.net Subject: [PHP] Time Problem: always ten past xx Hey everybody, I've got a strange problem. Using PHP5.3 on my MacBook. There is a script, which handles input from user, in this case a date and time. So I get for example "10:30" and "06.10.2009". Standard german time format. Now I try to get the correct timestamp: $time = strtotime("06.10.2009 10:30"); var_dump($time); var_dump(strftime("%d.%m.%Y %H:%m",$time)); But the result is as int 1254817800 string '06.10.2009 10:10' (length=16) The minutes are always "10", no matter what time I get. Anyone a clue? Thanks, Mattes P.S.: default timezone is set to date_default_timezone_set('Europe/Berlin'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ________________________________ Bu mesaj ve ekleri, mesajda gönderildiği belirtilen kişi/kişilere özeldir ve gizlidir. Size yanlışlıkla ulaşmışsa lütfen gönderen kisiyi bilgilendiriniz ve mesajı sisteminizden siliniz. Mesaj ve eklerinin içeriği ile ilgili olarak şirketimizin herhangi bir hukuki sorumluluğu bulunmamaktadır. Şirketimiz mesajın ve bilgilerinin size değişikliğe uğrayarak veya geç ulaşmasından, bütünlüğünün ve gizliliğinin korunamamasından, virüs içermesinden ve bilgisayar sisteminize verebileceği herhangi bir zarardan sorumlu tutulamaz. This message and attachments are confidential and intended for the individual(s) stated in this message. If you received this message in error, please immediately notify the sender and delete it from your system. Our company has no legal responsibility for the contents of the message and its attachments. Our company shall have no liability for any changes or late receiving, loss of integrity and confidentiality, viruses and any damages caused in anyway to your computer system.Matthias Laug Schillerstraße 36 10627 Berlin Tel.: 0176 / 20 14 21 63 eMail: matthias.laug@gmail.com