Login/Signup
Location: Home » Date() Bug: BST Incorrect Advertise

Date() Problems - BST Problem is ON

Testing BST Problems - Problem is ON

If you look below, right (“Top Ten Pages Today”) you will see a print-out of the current time on the server. This string includes ‘+0000’ indicating that British Summer Time is OFF on the server (for this page script).

Look now at bstoff.php and the same string (may have) become ‘+0100’, indicating that just one line of Date() code has switched BST off for this page (this obviously only happens during the Summer months).

Program code causing the problem:

This is the only code on this page (all other code is within common include-files):

     require_once('Date.php');
     $_DATE_TIMEZONE_DEFAULT='GB'; // will become 'UTC' or 'BST' if not preset (fixed)
     $today=new Date();
     $todayDST=($today->inDaylightTime()) // <=== this is the line that causes the problem
        ? "\$today has dst switched ON"
        : "\$today has dst switched OFF";

For the record, $todayDST := “$today has dst switched ON”, which is deeply ironic, in view of what date('r') is reporting on the right.

Date.php: $Id: Date.php,v 1.35 2005/11/15 00:16:38 pajoye Exp $
TimeZone.php: $Id: TimeZone.php,v 1.11 2005/11/15 00:16:40 pajoye Exp $

A longer explanation of this is at the 12 April, 2004 Diary page. The bug has been reported by email to the module writer and also on the PEAR bug-report page.

Copyright Statement

Compilation, original writings & design Copyright ©2002 - 2008 Modem-Help, Ltd.
All trademarks respected as the property of their respective owners.
Full Copyright + Disclaimer statement

Quick Stats

Items available:

  • 12,038 modems
  • 1,543 chipsets
  • 2,127 chips
  • 771 modem mfcs
  • 121 comp/MB mfcs
  • 1,665 comps/MBs/retail
  • 144 chipset mfcs
  • 16,951 external web links
  • 88,329 hardware IDs
  • 134,577 download files

Site Info, History & Page Stats

These pages are a LAMP-development of the original Modem-Help, UK site (most of the old HTML pages still exist, but havn’t been updated for quite some time). That site, in it’s turn, was a transfer from the first html site on free-pages at Freeserve (sadly, now gone). The current format allows superb search facilities, customisation by Registered members, plus is quick ‘n’ easy to update.

Diligently put together in the UK by Alex Kemp. All efforts have been taken to ensure the veracity of what is written - if you know of any errors or omissions then please let us know.

Privacy Policy
Site Info & Diary [Old Info ]

Page Compression: 73% at level 8

2,223 views of this page (0.02 secs to produce).
34,817,874 total site hits since 10 Nov 2002.
Page last updated 13 Aug 06
Original HTML site first installed 13 Feb 1999.

Valid XHTML 1.0 Transitional logoValid CSS logoLinux 2.4 logoPowered by Apache logoPowered by MySQL logoPowered by PHP logoRemote WorldPay logo