php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54466 Timezone offset for America/Caracas is wrong
Submitted: 2011-04-04 17:38 UTC Modified: 2011-04-06 17:49 UTC
From: jose dot zap at gmail dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.3.6 OS:
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: jose dot zap at gmail dot com
New email:
PHP Version: OS:

 

 [2011-04-04 17:38 UTC] jose dot zap at gmail dot com
Description:
------------
When using DateTimeZone::listIdentifiers() the offset for America/Caracas is shown 
as GMT -5:30, when it should be GMT -4:30

This can be validated here 
http://www.timeanddate.com/library/abbreviations/timezones/sa/vet.html


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-06 09:18 UTC] aharvey@php.net
-Status: Open +Status: Feedback
 [2011-04-06 09:18 UTC] aharvey@php.net
I'm rather confused by your bug: DateTimeZone::listIdentifiers() doesn't list offsets, and the code that does appears to be correct on any recent PHP version:

<?php
$tz = new DateTimeZone("America/Caracas");
var_dump($tz->getOffset(new DateTime()) / 3600);
?>

outputs float(-4.5), which lines up with your bug.

What version of PHP are you running, what does phpinfo() list the Olson Timezone Database Version as, and what do you get when you run the above code?
 [2011-04-06 16:42 UTC] jose dot zap at gmail dot com
-Status: Feedback +Status: Closed
 [2011-04-06 16:42 UTC] jose dot zap at gmail dot com
Sorry for opening the ticket with so little information, and thank you very much 
for your reply. I was using a third party library fro listing all timezones along 
with their offsets and while all seemed right, this one was listed as -5.5, I 
tested the code you provided and in fact -4.5 is returned. I guess I'll have to 
fix the library instead.

Again, thanks a lot for your help and sorry for wasting your time :)
 [2011-04-06 17:49 UTC] dtajchreber@php.net
-Status: Closed +Status: Bogus
 [2011-04-06 17:49 UTC] dtajchreber@php.net
Bumping to bogus per last comment.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 19:01:33 2024 UTC