php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8857 microtime() doesn't work after setlocale(LC_NUMERIC,"pl")
Submitted: 2001-01-23 12:30 UTC Modified: 2001-10-21 21:03 UTC
From: muhlig at us dot edu dot pl Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.0 Latest CVS (23/01/2001) OS: Solaris 2.4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: muhlig at us dot edu dot pl
New email:
PHP Version: OS:

 

 [2001-01-23 12:30 UTC] muhlig at us dot edu dot pl
the script:

<?php
echo "A: ", (double)microtime()*1000000;
setlocale(LC_NUMERIC,"pl");
echo "<BR>";
echo "B: ", (double)microtime()*1000000;
?>

the script's output:

A: 773149
B: 0

it works however under Solaris 2.6:

A: 588313
B: 590748

It is possible pl locale for Solaris 2.4 is somehow broken (although it seems elsewhere to work). Nevertheless even buggy locale shouldn't prevent other (PHP) functions (in consequence it breaks mt_srand and mt_rand) from working.

What is interesting: all locale categories do not produce this effect except LC_NUMERIC and LC_ALL.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-21 21:03 UTC] sniper@php.net
These functions use the functions provided by your system's
libs. Not a PHP bug -> bogus.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 17:01:30 2024 UTC