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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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