Connecting Tech Pros Worldwide Help | Site Map

Php 5 and DST - touch not working

  #1  
Old March 28th, 2008, 06:15 AM
Chuck Anderson
Guest
 
Posts: n/a
I've got a script that "syncs" files from my working hard drive (Windows
XP) to a backup drive based on filesize and filemtime. It's never had
problems at the DST switch before, but since upgrading to Php5, it seems
like Php is confused (is certainly confusing me) as to what time zone to
use. I am in Denver and I have set the default timezone to
"America/Denver" in php.ini (... would much prefer using numbers like
-0700 or -0600). The current time zone in Windows is MDT (which is
-0600). Php5 - date('O') - also tells me it is -0600 (or date ('T')
says - MDT).

When I touch the dest file (backup on H:/) with the timestamp of the
source file (on C:/), it does not change.
The timestamp of the dest file (backup) stays what it had previously been.

In other words. My initial scan shows (filemtime date - timestamp)
C:/file1.php - fmtime = 02/25/2007 22:34:26 - 1172468066 – size = 614
H:/file1.php - fmtime = 02/25/2007 21:34:26 - 1172464466 – size = 614

If I: touch ('H:/file1.php', 1172468066); // touch returns boolean TRUE

and I scan again I get the same results:
C:/file1.php - fmtime = 02/25/2007 22:34:26 - 1172468066 – size = 614
H:/file1.php - fmtime = 02/25/2007 21:34:26 - 1172464466 – size = 614

The file time of the copy on H:/ is unchanged. - ???

If I go back and run Php4, the file time does update.

Wot's uh the deal ...... why is Php5 "misbehaving?"

--
*****************************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
Nothing he's got he really needs
Twenty first century schizoid man.
***********************************

  #2  
Old March 28th, 2008, 12:15 PM
Jerry Stuckle
Guest
 
Posts: n/a

re: Php 5 and DST - touch not working


Chuck Anderson wrote:
Quote:
I've got a script that "syncs" files from my working hard drive (Windows
XP) to a backup drive based on filesize and filemtime. It's never had
problems at the DST switch before, but since upgrading to Php5, it seems
like Php is confused (is certainly confusing me) as to what time zone to
use. I am in Denver and I have set the default timezone to
"America/Denver" in php.ini (... would much prefer using numbers like
-0700 or -0600). The current time zone in Windows is MDT (which is
-0600). Php5 - date('O') - also tells me it is -0600 (or date ('T')
says - MDT).
>
When I touch the dest file (backup on H:/) with the timestamp of the
source file (on C:/), it does not change. The timestamp of the dest file
(backup) stays what it had previously been.
>
In other words. My initial scan shows (filemtime date - timestamp)
C:/file1.php - fmtime = 02/25/2007 22:34:26 - 1172468066 – size = 614
H:/file1.php - fmtime = 02/25/2007 21:34:26 - 1172464466 – size = 614
>
If I: touch ('H:/file1.php', 1172468066); // touch returns boolean TRUE
>
and I scan again I get the same results:
C:/file1.php - fmtime = 02/25/2007 22:34:26 - 1172468066 – size = 614
H:/file1.php - fmtime = 02/25/2007 21:34:26 - 1172464466 – size = 614
>
The file time of the copy on H:/ is unchanged. - ???
>
If I go back and run Php4, the file time does update.
Wot's uh the deal ...... why is Php5 "misbehaving?"
>
Yep, see http://bugs.php.net/bug.php?id=40568. Looks like it isn't
going to be fixed, however. I suggest you add your input to the bug
report. The more who do the more pressure it puts on them to fix it.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  #3  
Old March 28th, 2008, 03:15 PM
Alexey Kulentsov
Guest
 
Posts: n/a

re: Php 5 and DST - touch not working


Chuck Anderson wrote:
Quote:
The file time of the copy on H:/ is unchanged. - ???
Did you try clearstatcache() before getting timestamp second time?
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Realtime clock that understands DST Daz answers 7 July 13th, 2007 06:25 PM
Working with Timezones and DST Daz answers 5 May 27th, 2007 09:25 PM
Working with Timezones and DST Daz answers 3 May 27th, 2007 03:45 PM
[C] simple string question Alan answers 51 November 14th, 2005 03:03 AM
Image Resize does not work Sandwick answers 3 July 16th, 2005 11:38 PM