| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
  [2008-01-15 15:17 UTC] john at jcoppens dot com
 Description:
------------
mktime() and strftime use different timezones...
Reproduce code:
---------------
echo "time() = " . time() .
         " \nstrftime = ", strftime("%T %Z %z") .
         " \nGMT offset = " . mktime(0, 0, 0, 1, 1, 1970) .
         "\n";;
Expected result:
----------------
time() = 1200409896 
strftime = 13:11:36 ARST -0200 
GMT offset = 7200
Actual result:
--------------
time() = 1200409896 
strftime = 13:11:36 ARST -0200 
GMT offset = 10800
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 08:00:01 2025 UTC | 
What's the output of this script: <?php error_reporting( E_ALL | E_STRICT ); echo date_default_timezone_get(), "\n"; echo "time() = " . time() . " \nstrftime = ", strftime("%T %Z %z") . " \nGMT offset = " . mktime(0, 0, 0, 1, 1, 1970) . "\n"; ?>