php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #42921 date('u') doesn't work
Submitted: 2007-10-10 20:02 UTC Modified: 2007-10-13 13:06 UTC
From: root at mantoru dot de Assigned: bjori (profile)
Status: Closed Package: Documentation problem
PHP Version: 5.2.4 OS: Windows XP
Private report: No CVE-ID: None
 [2007-10-10 20:02 UTC] root at mantoru dot de
Description:
------------
The u modifier is supposed to convert into microseconds... however, under Windows (5.2.3) and Linux (5.2.4), I'm always getting '000000'.

Reproduce code:
---------------
<?php
echo date('u');
?>


Expected result:
----------------
6-digit number

Actual result:
--------------
000000

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-10 21:06 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

date() itself uses a integer based unix timestamp, which does not support fractions.
 [2007-10-11 06:20 UTC] bjori@php.net
Reclassified as documentation problem.

 [2007-10-11 13:29 UTC] root at mantoru dot de
Just out of interest... if the way date() works doesn't support milliseconds, why does 'u' exist in the first place?
 [2007-10-13 13:06 UTC] bjori@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 11:01:28 2024 UTC