SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2012
    Location
    Poole, Dorset, United Kingdom
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Display Current BST time or GMT with UTC timezone set

    Hi All
    I'm not sure whats wrong but I have date_default_timezone set as UTC.
    I'm in the UK so on British Summer Time.

    Whatever I try to get the current time its always 1 hour behind shown i guess as UTC, i thought php would compensate
    and give me the correct time for BST and when back in normal GMT

    Any help would be great

  2. #2
    SitePoint Zealot
    Join Date
    Jul 2012
    Location
    Scarborough, North Yorkshire, United Kingdom
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can set the current timezone, if you put it in an include file you only have to call once.

    PHP Code:
        date_default_timezone_set('GMT'); 
    http://php.net/manual/en/function.da...mezone-set.php
    Richard
    Resell SSL Certificates - API / WHMCS / HostBill / ClientExec
    ServerTastic - RapidSSL, Geotrust, Thawte, Symantec, SmarterTools and more


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •