|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-10-27 13:47 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 05:00:01 2025 UTC |
<?php // format got from a PostgreSQL datetime column type $date = '2001-10-22 21:19:58+02'; $stamp = strtotime($date); $conv = date('d/m/Y H:i:s', $stamp); echo "$date\n$conv\n"; ?> Output: 2001-10-22 21:19:58+02 22/10/2001 23:17:58 It is adding 2 hours and substracting 2 minutes in all the cases (tested with more $date values). Tomas V.V.Cox