php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1421 gettimeofday() doesn't return timezone information
Submitted: 1999-05-18 08:36 UTC Modified: 1999-05-18 08:58 UTC
From: k at 123 dot org Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.7 OS: Solaris 2.x
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: k at 123 dot org
New email:
PHP Version: OS:

 

 [1999-05-18 08:36 UTC] k at 123 dot org
When calling gettimeofday(), the "minuteswest" and "dsttime" components are filled with nonsense. This seems to be because Solaris is having a strange gettimeofday(3) function, the man page says:

     int gettimeofday(struct timeval *tp, void *);

and

     The second argument  to  gettimeofday()  and  settimeofday()
     should be a pointer to NULL.

Now, php's gettimeofday() can't tell about the timezone information.  This happens on Solaris 2.5 and 2.7,
I haven't checked other Solaris versions.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-05-18 08:58 UTC] sas at cvs dot php dot net
fixed in CVS. The structures are initialized properly before calling gettimeofday() now.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 14 08:00:01 2026 UTC