php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #45343 time() description is incredibly confusing.
Submitted: 2008-06-24 01:26 UTC Modified: 2008-06-24 06:42 UTC
From: jabbsjabbsjabbs at hotmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2008-06-24 01:26 UTC] jabbsjabbsjabbs at hotmail dot com
Description:
------------
Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).

Since the Epoch is defined as a specific time and timezone, such a value as described is the same everywhere in the world, yet time() returns the local time. i.e. the number of seconds since January 1 1970 00:00:00 XXX where XXX is your current timezone.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-06-24 06:42 UTC] derick@php.net
No, that's not true. The epoch is really defined as January 1 1970 00:00:00 GMT and is *not* effected by the current locale timezone. The same epoch second is the same everywhere in the world, although the *local* time differs.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Jun 16 11:00:01 2026 UTC