PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Networking » Net_NNTP » Bug #6334

Wrong timestamps on non-GMT timezones

Details

Submitted2005-12-22 23:02 UTC
Fromstruchkov at gmail dot com
Assignedheino
StatusClosed
PackageNet_NNTP
PHP VersionIrrelevant
Roadmaps(Not assigned)

Comments

[2005-12-22 23:02 UTC] struchkov at gmail dot com

Description:
------------
function cmdNewnews($time, $newsgroups, $distribution = null)
{
$date = date('ymd His', $time);
.......
if (is_null($distribution)) {
$command = 'NEWNEWS ' . $newsgroups . ' ' . $date . ' GMT';
} else {
.......
}
The date must be a GMT-timestamp, but if my server is working in different timezone, date('ymd His') return a non-GMT timestamp.

[2005-12-22 23:04 UTC] heino at php dot net

Replacing date() with gmdate() should be sufficient, right?

[2005-12-25 20:18 UTC] struchkov at gmail dot com

Yes,It's right.

[2005-12-28 02:28 UTC] heino at php dot net

Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at
http://pear.php.net/get/Net_NNTP